DORMANTno replies

[PATCH] adapter: Fix memory leak in convert_config

From: Szymon Janc <hidden>
Date: 2012-11-28 14:59:28
Subsystem: the rest · Maintainer: Linus Torvalds

'converted' was not freed if config file was already converted.
---
 src/adapter.c |    1 +
 1 file changed, 1 insertion(+)
diff --git a/src/adapter.c b/src/adapter.c
index 163360f..b44eb36 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -2698,6 +2698,7 @@ static void convert_config(struct btd_adapter *adapter, const char *filename,
 	if (converted) {
 		if (strcmp(converted, "yes") == 0) {
 			DBG("Legacy config file already converted");
+			g_free(converted);
 			return;
 		}
 
-- 
1.7.9.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help