rpng_process_init - free resources when failing

This commit is contained in:
twinaphex 2016-05-19 00:46:07 +02:00
parent a0974a899d
commit 6c2e933321

View File

@ -804,6 +804,12 @@ static struct rpng_process_t *rpng_process_init(rpng_t *rpng,
return process;
error:
if (process->inflate_buf)
free(process->inflate_buf);
if (process->stream)
process->stream_backend->stream_free(process->stream);
if (process)
free(process);
return NULL;
}