Linux bluetooth development
 help / color / mirror / Atom feed
From: Syam Sidhardhan <s.syam@samsung.com>
To: linux-bluetooth@vger.kernel.org
Cc: Syam Sidhardhan <s.syam@samsung.com>
Subject: [PATCH obexd 2/2] Fix dbus memory leak
Date: Wed, 09 Nov 2011 11:29:40 +0530	[thread overview]
Message-ID: <1320818380-17217-2-git-send-email-s.syam@samsung.com> (raw)
In-Reply-To: <1320818380-17217-1-git-send-email-s.syam@samsung.com>

---
 plugins/usb.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/plugins/usb.c b/plugins/usb.c
index a0ec21b..12fb30c 100644
--- a/plugins/usb.c
+++ b/plugins/usb.c
@@ -242,11 +242,13 @@ static void *usb_start(struct obex_server *server, int *err)
 	if (dbus_connection_send_with_reply(connection,
 					msg, &call, -1) == FALSE) {
 		error("usb: unable to send mode_request");
+		dbus_message_unref(msg);
 		goto fail;
 	}
 
 	dbus_pending_call_set_notify(call, mode_request_reply, server, NULL);
 	dbus_pending_call_unref(call);
+	dbus_message_unref(msg);
 
 	id = g_dbus_add_signal_watch(connection, NULL, NULL,
 					"com.meego.usb_moded",
-- 
1.7.4.1


  reply	other threads:[~2011-11-09  5:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-09  5:59 [PATCH obexd 1/2] Fix empty parameter list in function declaration Syam Sidhardhan
2011-11-09  5:59 ` Syam Sidhardhan [this message]
2011-11-14 10:53 ` Johan Hedberg

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=1320818380-17217-2-git-send-email-s.syam@samsung.com \
    --to=s.syam@samsung.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /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