From 4a54d91c7d0cd9e28b5047e9797c75792b237304 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 12 Oct 2010 11:08:09 +0300 Subject: [PATCH] obexd: Fix possible NULL pointer deference Variable "transfer" tracked as NULL was passed to function "transfer_unregister" that dereferences it. --- obexd/client/session.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/obexd/client/session.c b/obexd/client/session.c index 7539a97be..ce3432d6b 100644 --- a/obexd/client/session.c +++ b/obexd/client/session.c @@ -1274,10 +1274,8 @@ int session_send(struct session_data *session, const char *filename, transfer = transfer_register(session, filename, targetname, NULL, NULL); - if (transfer == NULL) { - err = -EINVAL; - goto fail; - } + if (transfer == NULL) + return -EINVAL; /* Transfer should start if it is the first in the pending list */ if (transfer != session->pending->data) -- 2.47.3