diff options
author | Brian Gix <brian.gix@intel.com> | 2020-05-22 12:50:32 -0700 |
---|---|---|
committer | Abhay Agarwal <ay.agarwal@samsung.com> | 2020-05-28 16:57:22 +0530 |
commit | 366ad61879eb06a53a4709ed4a9025b70b8a0ec6 (patch) | |
tree | 5d7ccb98197469b6aaa86ded10a3ab38c26cfea0 | |
parent | 9a0ba510f3503d0042476d375111a19ae8190aef (diff) | |
download | bluez-366ad61879eb06a53a4709ed4a9025b70b8a0ec6.tar.gz bluez-366ad61879eb06a53a4709ed4a9025b70b8a0ec6.tar.bz2 bluez-366ad61879eb06a53a4709ed4a9025b70b8a0ec6.zip |
mesh: Fix leaked message reference
Change-Id: I5184625d2b6d443f44e6819c64f0b738bfdfa7ee
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
-rw-r--r-- | mesh/manager.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mesh/manager.c b/mesh/manager.c index 2eb86056..d088842d 100644 --- a/mesh/manager.c +++ b/mesh/manager.c @@ -230,6 +230,7 @@ static void add_start(void *user_data, int err) "Failed to start provisioning initiator"); l_dbus_send(dbus_get_bus(), reply); + l_dbus_message_unref(add_pending->msg); add_pending->msg = NULL; } @@ -266,7 +267,6 @@ static struct l_dbus_message *add_node_call(struct l_dbus *dbus, /* Invoke Prov Initiator */ add_pending = l_new(struct add_data, 1); - add_pending->msg = l_dbus_message_ref(msg); memcpy(add_pending->uuid, uuid, 16); add_pending->node = node; add_pending->agent = node_get_agent(node); @@ -279,6 +279,7 @@ static struct l_dbus_message *add_node_call(struct l_dbus *dbus, goto fail; } + add_pending->msg = l_dbus_message_ref(msg); initiator_start(PB_ADV, uuid, 99, 60, add_pending->agent, add_start, add_data_get, add_cmplt, node, add_pending); |