From: Szymon Janc Date: Thu, 28 Feb 2013 15:20:29 +0000 (+0100) Subject: bluetooth: Fix possible NULL pointer dereference X-Git-Tag: 0.10~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=50b69463848c046bd4da1ec22e868509c590e9ba;p=platform%2Fupstream%2Fneard.git bluetooth: Fix possible NULL pointer dereference If DBus message allocation failed NULL pointer msg would be passed to libdbus functions later on resulting in libdbus NULL pointer assertion or crash. --- diff --git a/src/bluetooth.c b/src/bluetooth.c index 57163aa..0207919 100644 --- a/src/bluetooth.c +++ b/src/bluetooth.c @@ -157,7 +157,7 @@ static int bt_generic_call(DBusConnection *conn, if (msg == NULL) { near_error("Unable to allocate new D-Bus %s message", method); - err = -ENOMEM; + return -ENOMEM; } va_start(args, type);