projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d95249
)
iptables: Allocated memory blocks are already zerod out
author
Daniel Wagner
<daniel.wagner@bmw-carit.de>
Tue, 12 Mar 2013 17:16:47 +0000
(18:16 +0100)
committer
Patrik Flykt
<patrik.flykt@linux.intel.com>
Mon, 18 Mar 2013 12:31:26 +0000
(14:31 +0200)
entry_head and entry_return are allocated via g_try_malloc0().
src/iptables.c
patch
|
blob
|
history
diff --git
a/src/iptables.c
b/src/iptables.c
index
e4935b2
..
1fd6c42
100644
(file)
--- a/
src/iptables.c
+++ b/
src/iptables.c
@@
-613,8
+613,6
@@
static int iptables_add_chain(struct connman_iptables *table,
if (entry_head == NULL)
goto err_head;
- memset(entry_head, 0, entry_head_size);
-
entry_head->target_offset = sizeof(struct ipt_entry);
entry_head->next_offset = entry_head_size;
@@
-633,8
+631,6
@@
static int iptables_add_chain(struct connman_iptables *table,
if (entry_return == NULL)
goto err;
- memset(entry_return, 0, entry_return_size);
-
entry_return->target_offset = sizeof(struct ipt_entry);
entry_return->next_offset = entry_return_size;