diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2013-03-12 18:16:47 +0100 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-03-18 14:31:26 +0200 |
commit | e5e4fdc533ea997d6fdf0c550730786ec83707fa (patch) | |
tree | 7def4ee0f1dc4c70fb469186a280281d28c8a1f0 | |
parent | 2d95249a237dba384561558ad89d432ca24ee201 (diff) | |
download | connman-e5e4fdc533ea997d6fdf0c550730786ec83707fa.tar.gz connman-e5e4fdc533ea997d6fdf0c550730786ec83707fa.tar.bz2 connman-e5e4fdc533ea997d6fdf0c550730786ec83707fa.zip |
iptables: Allocated memory blocks are already zerod out
entry_head and entry_return are allocated via g_try_malloc0().
-rw-r--r-- | src/iptables.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/iptables.c b/src/iptables.c index e4935b2d..1fd6c428 100644 --- 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; |