From: Brian Gix <brian.gix@intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: inga.stotland@intel.com, brian.gix@intel.com,
michal.lowas-rzechonek@silvair.com
Subject: [PATCH BlueZ] mesh: Fix memory leak on dbus message creation
Date: Wed, 3 Jul 2019 09:34:03 -0700 [thread overview]
Message-ID: <20190703163403.15814-1-brian.gix@intel.com> (raw)
---
mesh/model.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mesh/model.c b/mesh/model.c
index 7401dcecb..a2b3e5c18 100644
--- a/mesh/model.c
+++ b/mesh/model.c
@@ -729,10 +729,13 @@ static void send_msg_rcvd(struct mesh_node *node, uint8_t ele_idx, bool is_sub,
if (!l_dbus_message_builder_finalize(builder))
goto error;
+ l_dbus_message_builder_destroy(builder);
l_dbus_send(dbus, msg);
+ return;
error:
l_dbus_message_builder_destroy(builder);
+ l_dbus_message_unref(msg);
}
bool mesh_model_rx(struct mesh_node *node, bool szmict, uint32_t seq0,
--
2.14.5
next reply other threads:[~2019-07-03 16:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-03 16:34 Brian Gix [this message]
2019-07-03 17:24 ` [PATCH BlueZ] mesh: Fix memory leak on dbus message creation Michał Lowas-Rzechonek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190703163403.15814-1-brian.gix@intel.com \
--to=brian.gix@intel.com \
--cc=inga.stotland@intel.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=michal.lowas-rzechonek@silvair.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox