projects
/
platform
/
core
/
connectivity
/
bluetooth-frwk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c0fd298
)
Fix NULL dereference issue
13/172413/2
author
Wootak Jung
<wootak.jung@samsung.com>
Wed, 14 Mar 2018 00:48:43 +0000
(09:48 +0900)
committer
Wootak Jung
<wootak.jung@samsung.com>
Wed, 14 Mar 2018 04:14:41 +0000
(13:14 +0900)
Change-Id: I2c2ec27c180425cbe7727bf85813dd6f3af73092
bt-api/bt-common.c
patch
|
blob
|
history
diff --git
a/bt-api/bt-common.c
b/bt-api/bt-common.c
index
cbf31d5
..
40f7fd1
100644
(file)
--- a/
bt-api/bt-common.c
+++ b/
bt-api/bt-common.c
@@
-1940,12
+1940,17
@@
GVariant *_bt_get_managed_objects(void)
BT_MANAGER_INTERFACE,
NULL, &error);
- if (
manager_proxy == NULL &&
error) {
+ if (error) {
BT_ERR("Unable to create proxy: %s", error->message);
g_clear_error(&error);
+ if (manager_proxy)
+ g_object_unref(manager_proxy);
return NULL;
}
+ if (!manager_proxy)
+ return NULL;
+
result = g_dbus_proxy_call_sync(manager_proxy,
"GetManagedObjects", NULL,
G_DBUS_CALL_FLAGS_NONE, -1,