diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2013-02-21 17:42:28 +0100 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-02-22 12:42:44 +0200 |
commit | 549278f755c026e0282ec5bcb5e9c001705dcbca (patch) | |
tree | b63c33a40fd932851b17461c4f1cee6b94d35828 | |
parent | ea830d1ba97eef7c29cf368fe891ec94d0d1706e (diff) | |
download | connman-549278f755c026e0282ec5bcb5e9c001705dcbca.tar.gz connman-549278f755c026e0282ec5bcb5e9c001705dcbca.tar.bz2 connman-549278f755c026e0282ec5bcb5e9c001705dcbca.zip |
iptables: Free xtables entry when removing one entry from the table
-rw-r--r-- | src/iptables.c | 5 |
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; } |