[PATCH v2 1/2] adapter: Fix memory leak in convert_config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



'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..d6f8a37 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");
+			free(converted);
 			return;
 		}
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux