diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2013-02-28 16:20:29 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-03-04 11:24:05 +0100 |
commit | 50b69463848c046bd4da1ec22e868509c590e9ba (patch) | |
tree | 604dfbd44aab7a98e9f5511714da982ca569f049 /src | |
parent | 2c3aaf5f7050bac50e482256b879d4f9f3113bd3 (diff) | |
download | neard-50b69463848c046bd4da1ec22e868509c590e9ba.tar.gz neard-50b69463848c046bd4da1ec22e868509c590e9ba.tar.bz2 neard-50b69463848c046bd4da1ec22e868509c590e9ba.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/bluetooth.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |