diff options
author | Kalle Valo <kalle.valo@canonical.com> | 2011-02-07 15:33:56 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-02-08 12:58:54 +0100 |
commit | 83c71f78bfda87fbed9aca13c3fef2605fe0ce7b (patch) | |
tree | ca37e33a6f39adc27b21b509bf672e69f50082bf /src/iptables.c | |
parent | b8b576d099934e55b9648debf4280c360bd4a3ef (diff) | |
download | connman-83c71f78bfda87fbed9aca13c3fef2605fe0ce7b.tar.gz connman-83c71f78bfda87fbed9aca13c3fef2605fe0ce7b.tar.bz2 connman-83c71f78bfda87fbed9aca13c3fef2605fe0ce7b.zip |
iptables: Fix uninitialised use of entry_return
src/iptables.c:432:20: error: ‘entry_return’ may be used
uninitialized in this function
Diffstat (limited to 'src/iptables.c')
-rw-r--r-- | src/iptables.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/iptables.c b/src/iptables.c index 9e7f7175..8f8ab53c 100644 --- a/src/iptables.c +++ b/src/iptables.c @@ -450,7 +450,7 @@ static int iptables_add_chain(struct connman_iptables *table, sizeof(struct error_target); entry_head = g_try_malloc0(entry_head_size); if (entry_head == NULL) - goto err; + goto err_head; memset(entry_head, 0, entry_head_size); @@ -463,7 +463,7 @@ static int iptables_add_chain(struct connman_iptables *table, strcpy(error->error, name); if (iptables_add_entry(table, entry_head, last, -1) < 0) - goto err; + goto err_head; /* tail entry */ entry_return_size = sizeof(struct ipt_entry) + @@ -488,8 +488,9 @@ static int iptables_add_chain(struct connman_iptables *table, return 0; err: - g_free(entry_head); g_free(entry_return); +err_head: + g_free(entry_head); return -ENOMEM; } |