Fix memory leaks in iptables library
authorLeena Gunda <leena.gunda@wipro.com>
Thu, 30 Dec 2010 06:43:41 +0000 (12:13 +0530)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 30 Dec 2010 07:00:12 +0000 (23:00 -0800)
Fixes BMC#11830

src/iptables.c

index 6860fdd..c799c25 100644 (file)
@@ -902,6 +902,7 @@ static void table_cleanup(struct connman_iptables *table)
                entry = list->data;
 
                g_free(entry->entry);
+               g_free(entry);
        }
 
        g_list_free(table->entries);
@@ -1300,6 +1301,7 @@ int __connman_iptables_commit(const char *table_name)
 
        err = iptables_replace(table, repl);
 
+       g_free(repl->counters);
        g_free(repl);
 
        if (err < 0)