From 50b69463848c046bd4da1ec22e868509c590e9ba Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Thu, 28 Feb 2013 16:20:29 +0100 Subject: [PATCH] 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. --- src/bluetooth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.7.4