linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] android/hidhost: Fix memory leak
@ 2013-11-13 14:29 Andrei Emeltchenko
  2013-11-13 14:29 ` [PATCH 2/2] android/hidhost: Use correct error structure Andrei Emeltchenko
  2013-11-13 14:48 ` [PATCH 1/2] android/hidhost: Fix memory leak Johan Hedberg
  0 siblings, 2 replies; 3+ messages in thread
From: Andrei Emeltchenko @ 2013-11-13 14:29 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

---
 android/hidhost.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/android/hidhost.c b/android/hidhost.c
index 910014f..ff3eae0 100644
--- a/android/hidhost.c
+++ b/android/hidhost.c
@@ -1136,6 +1136,7 @@ static void connect_cb(GIOChannel *chan, GError *err, gpointer user_data)
 	if (err) {
 		error("%s", gerr->message);
 		g_io_channel_shutdown(chan, TRUE, NULL);
+		g_error_free(gerr);
 		return;
 	}
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] android/hidhost: Use correct error structure
  2013-11-13 14:29 [PATCH 1/2] android/hidhost: Fix memory leak Andrei Emeltchenko
@ 2013-11-13 14:29 ` Andrei Emeltchenko
  2013-11-13 14:48 ` [PATCH 1/2] android/hidhost: Fix memory leak Johan Hedberg
  1 sibling, 0 replies; 3+ messages in thread
From: Andrei Emeltchenko @ 2013-11-13 14:29 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

---
 android/hidhost.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/android/hidhost.c b/android/hidhost.c
index ff3eae0..3c1f074 100644
--- a/android/hidhost.c
+++ b/android/hidhost.c
@@ -1128,12 +1128,12 @@ static void connect_cb(GIOChannel *chan, GError *err, gpointer user_data)
 		return;
 	}
 
-	bt_io_get(chan, &err,
+	bt_io_get(chan, &gerr,
 			BT_IO_OPT_SOURCE_BDADDR, &src,
 			BT_IO_OPT_DEST_BDADDR, &dst,
 			BT_IO_OPT_PSM, &psm,
 			BT_IO_OPT_INVALID);
-	if (err) {
+	if (gerr) {
 		error("%s", gerr->message);
 		g_io_channel_shutdown(chan, TRUE, NULL);
 		g_error_free(gerr);
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] android/hidhost: Fix memory leak
  2013-11-13 14:29 [PATCH 1/2] android/hidhost: Fix memory leak Andrei Emeltchenko
  2013-11-13 14:29 ` [PATCH 2/2] android/hidhost: Use correct error structure Andrei Emeltchenko
@ 2013-11-13 14:48 ` Johan Hedberg
  1 sibling, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2013-11-13 14:48 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: linux-bluetooth

Hi Andrei,

On Wed, Nov 13, 2013, Andrei Emeltchenko wrote:
> ---
>  android/hidhost.c |    1 +
>  1 file changed, 1 insertion(+)

Both patches have been applied. Thanks.

Johan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-13 14:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-13 14:29 [PATCH 1/2] android/hidhost: Fix memory leak Andrei Emeltchenko
2013-11-13 14:29 ` [PATCH 2/2] android/hidhost: Use correct error structure Andrei Emeltchenko
2013-11-13 14:48 ` [PATCH 1/2] android/hidhost: Fix memory leak Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).