Messages in this thread Patch in this message | | | Date | Thu, 17 Mar 2005 01:10:11 +0100 (CET) | From | Jesper Juhl <> | Subject | [PATCH] gen_init_cpio.c : don't check for NULL before free() |
| |
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@dif.dk>
--- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |