[PATCH] gen_init_cpio.c : don't check for NULL before free()

From: Jesper Juhl
Date: Wed Mar 16 2005 - 19:16:38 EST



in usr/gen_init_cpio.c::cpio_mkfile() a pointer is checked for NULL before
calling free() on it - this is redundant, free() copes just fine with NULL
pointers.


Signed-off-by: Jesper Juhl <juhl-lkml@xxxxxx>

--- linux-2.6.11-mm4-orig/usr/gen_init_cpio.c 2005-03-02 08:38:12.000000000 +0100
+++ linux-2.6.11-mm4/usr/gen_init_cpio.c 2005-03-17 01:05:25.000000000 +0100
@@ -349,7 +349,7 @@ static int cpio_mkfile(const char *name,
rc = 0;

error:
- if (filebuf) free(filebuf);
+ free(filebuf);
if (file >= 0) close(file);
return rc;
}



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/