Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] android/handsfree: Fix memory leak
@ 2014-02-05 10:50 Andrei Emeltchenko
  2014-02-05 13:45 ` Szymon Janc
  0 siblings, 1 reply; 2+ messages in thread
From: Andrei Emeltchenko @ 2014-02-05 10:50 UTC (permalink / raw)
  To: linux-bluetooth

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

Free classes if sdp_get_access_protos fails.
---
 android/handsfree.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/android/handsfree.c b/android/handsfree.c
index edf3d27..9482b2e 100644
--- a/android/handsfree.c
+++ b/android/handsfree.c
@@ -229,6 +229,7 @@ static void sdp_search_cb(sdp_list_t *recs, int err, gpointer data)
 
 	if (sdp_get_access_protos(recs->data, &protos) < 0) {
 		error("handsfree: unable to get access protocols from record");
+		sdp_list_free(classes, free);
 		goto fail;
 	}
 
-- 
1.8.3.2


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

end of thread, other threads:[~2014-02-05 13:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-05 10:50 [PATCH] android/handsfree: Fix memory leak Andrei Emeltchenko
2014-02-05 13:45 ` Szymon Janc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox