aboutsummaryrefslogtreecommitdiffstats
path: root/binding/bluetooth-util.c
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-11-04 14:49:18 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2018-11-12 03:58:47 -0800
commitb379d641c4d1862baa47c7d2522773925aa4dd43 (patch)
tree9a5d9b89b2b2129259e3031cea363fba801930af /binding/bluetooth-util.c
parent28dae92e48c05478bb05a9d6de3ff26dbd103037 (diff)
binding: bluetooth: fix interface removal event
Don't send adapter name in 'device' parameter on removal of bluetooth interface. Bug-AGL: SPEC-1630 Change-Id: I15cb4dcc791d36beb8e8b41993644cad331d3cae Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding/bluetooth-util.c')
-rw-r--r--binding/bluetooth-util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/binding/bluetooth-util.c b/binding/bluetooth-util.c
index 4740cda..963af82 100644
--- a/binding/bluetooth-util.c
+++ b/binding/bluetooth-util.c
@@ -1033,8 +1033,10 @@ void json_process_path(json_object *jresp, const char *path) {
g_free(tmp);
tmp = bluez_return_device(path);
- json_object_object_add(jresp, "device", json_object_new_string(tmp));
- g_free(tmp);
+ if (tmp) {
+ json_object_object_add(jresp, "device", json_object_new_string(tmp));
+ g_free(tmp);
+ }
}
gchar *return_bluez_path(afb_req_t request) {