summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}