summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorKalle Valo <kalle.valo@canonical.com>2011-02-07 15:33:43 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2011-02-08 12:19:34 +0100
commitb8b576d099934e55b9648debf4280c360bd4a3ef (patch)
tree033d8a1eb22006990cc61834a80adb1645808f59 /tools
parent43e7c3f2b85fa4b253382d7b6ffea4fc96817543 (diff)
downloadconnman-b8b576d099934e55b9648debf4280c360bd4a3ef.tar.gz
connman-b8b576d099934e55b9648debf4280c360bd4a3ef.tar.bz2
connman-b8b576d099934e55b9648debf4280c360bd4a3ef.zip
iptables-test: Fix uninitialised use of entry_return
tools/iptables-test.c:455:20: error: ‘entry_return’ may be used uninitialized in this function
Diffstat (limited to 'tools')
-rw-r--r--tools/iptables-test.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/iptables-test.c b/tools/iptables-test.c
index e316cc93..298f23d5 100644
--- a/tools/iptables-test.c
+++ b/tools/iptables-test.c
@@ -473,7 +473,7 @@ static int connman_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);
@@ -486,7 +486,7 @@ static int connman_iptables_add_chain(struct connman_iptables *table,
strcpy(error->error, name);
if (connman_add_entry(table, entry_head, last, -1) < 0)
- goto err;
+ goto err_head;
/* tail entry */
entry_return_size = sizeof(struct ipt_entry) +
@@ -511,8 +511,9 @@ static int connman_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;
}