summaryrefslogtreecommitdiff
path: root/src/iptables.c
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2013-02-21 17:42:28 +0100
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-02-22 12:42:44 +0200
commit549278f755c026e0282ec5bcb5e9c001705dcbca (patch)
treeb63c33a40fd932851b17461c4f1cee6b94d35828 /src/iptables.c
parentea830d1ba97eef7c29cf368fe891ec94d0d1706e (diff)
downloadconnman-549278f755c026e0282ec5bcb5e9c001705dcbca.tar.gz
connman-549278f755c026e0282ec5bcb5e9c001705dcbca.tar.bz2
connman-549278f755c026e0282ec5bcb5e9c001705dcbca.zip
iptables: Free xtables entry when removing one entry from the table
Diffstat (limited to 'src/iptables.c')
-rw-r--r--src/iptables.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/iptables.c b/src/iptables.c
index 8fa3687f..7376792f 100644
--- a/src/iptables.c
+++ b/src/iptables.c
@@ -485,10 +485,11 @@ static int remove_table_entry(struct connman_iptables *table,
table->size -= entry->entry->next_offset;
removed = entry->entry->next_offset;
- g_free(entry->entry);
-
table->entries = g_list_remove(table->entries, entry);
+ g_free(entry->entry);
+ g_free(entry);
+
return removed;
}