OSDN Git Service

adapter: Fix improper freeing with g_free in convert_config
authorSzymon Janc <szymon.janc@tieto.com>
Wed, 28 Nov 2012 15:17:36 +0000 (16:17 +0100)
committerJohan Hedberg <johan.hedberg@intel.com>
Wed, 28 Nov 2012 17:06:32 +0000 (19:06 +0200)
Memory in textfile_get is allocated with malloc and it should be freed
with free not g_free.

src/adapter.c

index d6f8a37..f134dfe 100644 (file)
@@ -2702,7 +2702,7 @@ static void convert_config(struct btd_adapter *adapter, const char *filename,
                        return;
                }
 
-               g_free(converted);
+               free(converted);
        }
 
        if (read_local_name(&adapter->bdaddr, str) == 0)