projects
/
oweals
/
firewall3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f3cd50
)
Avoid segfault when freeing rules whose target could not be found
author
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 26 May 2013 14:22:01 +0000
(16:22 +0200)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 26 May 2013 14:33:45 +0000
(16:33 +0200)
iptables.c
patch
|
blob
|
history
diff --git
a/iptables.c
b/iptables.c
index cea3fcd92b60a22fc188091f76409f2467aafdcd..2684933970ef26d08bbbeaafffbaaa5fe0cf9fb8 100644
(file)
--- a/
iptables.c
+++ b/
iptables.c
@@
-1271,7
+1271,9
@@
free:
xtables_rule_matches_free(&r->matches);
- free(r->target->t);
+ if (r->target)
+ free(r->target->t);
+
free(r);
/* reset all targets and matches */