Skip to content
Snippets Groups Projects
Commit feafcfaa authored by Mark Adler's avatar Mark Adler
Browse files

No need to check for NULL argument to free().

parent 77bc4f89
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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;
}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment