From feafcfaa05537869bd128af5474f62b19df8b502 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Fri, 30 Dec 2016 14:30:52 -0800 Subject: No need to check for NULL argument to free(). --- gzread.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'gzread.c') diff --git a/gzread.c b/gzread.c index ebf2c18..3811157 100644 --- a/gzread.c +++ b/gzread.c @@ -95,10 +95,8 @@ local int gz_look(state) state->in = (unsigned char *)malloc(state->want); state->out = (unsigned char *)malloc(state->want << 1); if (state->in == NULL || state->out == NULL) { - if (state->out != NULL) - free(state->out); - if (state->in != NULL) - free(state->in); + free(state->out); + free(state->in); gz_error(state, Z_MEM_ERROR, "out of memory"); return -1; } -- cgit v1.2.1