DORMANTno replies

[PATCH 2/2] Fix memory leak of matched device drivers list

From: Claudio Takahasi <hidden>
Date: 2011-03-23 12:20:52
Subsystem: the rest · Maintainer: Linus Torvalds

---
 src/device.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/device.c b/src/device.c
index b4d13f2..771a908 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1111,8 +1111,7 @@ static GSList *device_match_driver(struct btd_device *device,
 
 		/* match pattern driver */
 		match = device_match_pattern(device, *uuid, profiles);
-		for (; match; match = match->next)
-			uuids = g_slist_append(uuids, match->data);
+		uuids = g_slist_concat(uuids, match);
 	}
 
 	return uuids;
-- 
1.7.4.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help