From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8dB8-00009d-He for qemu-devel@nongnu.org; Mon, 03 Sep 2012 16:23:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8dB6-00088b-SM for qemu-devel@nongnu.org; Mon, 03 Sep 2012 16:23:26 -0400 From: Stefan Weil Date: Mon, 3 Sep 2012 22:23:23 +0200 Message-Id: <1346703803-22003-1-git-send-email-sw@weilnetz.de> Subject: [Qemu-devel] [PATCH] sparc-dis: Remove redundant NULL check List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-trivial@nongnu.org Cc: Stefan Weil , qemu-devel@nongnu.org Report from smatch: sparc-dis.c:2664 build_hash_table(14) info: redundant null check on hash_buf calling free() Signed-off-by: Stefan Weil --- Coding style was not fixed. - sw sparc-dis.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sparc-dis.c b/sparc-dis.c index cdd337a..ef28835 100644 --- a/sparc-dis.c +++ b/sparc-dis.c @@ -2660,8 +2660,7 @@ build_hash_table (const sparc_opcode **opcode_table, memset (hash_table, 0, HASH_SIZE * sizeof (hash_table[0])); memset (hash_count, 0, HASH_SIZE * sizeof (hash_count[0])); - if (hash_buf != NULL) - free (hash_buf); + free (hash_buf); hash_buf = malloc (sizeof (* hash_buf) * num_opcodes); for (i = num_opcodes - 1; i >= 0; --i) { -- 1.7.10