From b8b576d099934e55b9648debf4280c360bd4a3ef Mon Sep 17 00:00:00 2001 From: Kalle Valo Date: Mon, 7 Feb 2011 15:33:43 +0200 Subject: [PATCH] iptables-test: Fix uninitialised use of entry_return MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit tools/iptables-test.c:455:20: error: ‘entry_return’ may be used uninitialized in this function --- tools/iptables-test.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/iptables-test.c b/tools/iptables-test.c index e316cc9..298f23d 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; } -- 2.7.4