projects
/
framework
/
connectivity
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bacc15b
)
iptables: Fix memory leak
author
Tomasz Bursztyka
<tomasz.bursztyka@linux.intel.com>
Fri, 23 Sep 2011 11:43:38 +0000
(14:43 +0300)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Thu, 29 Sep 2011 15:52:59 +0000
(17:52 +0200)
src/iptables.c
patch
|
blob
|
history
diff --git
a/src/iptables.c
b/src/iptables.c
index
78ad210
..
a8167ee
100644
(file)
--- a/
src/iptables.c
+++ b/
src/iptables.c
@@
-633,7
+633,7
@@
iptables_add_rule(struct connman_iptables *table,
GList *chain_tail, *chain_head;
struct ipt_entry *new_entry;
struct connman_iptables_entry *head;
- int builtin = -1;
+ int builtin = -1
, ret
;
DBG("");
@@
-666,7
+666,11
@@
iptables_add_rule(struct connman_iptables *table,
head->builtin = -1;
}
- return iptables_add_entry(table, new_entry, chain_tail->prev, builtin);
+ ret = iptables_add_entry(table, new_entry, chain_tail->prev, builtin);
+ if (ret < 0)
+ g_free(new_entry);
+
+ return ret;
}
static struct ipt_replace *