There is a possible memory leak:
|
ptr = malloc(sizeof(UINT8) * c->bufsize); |
|
if (!ptr) { |
|
state->errcode = IMAGING_CODEC_MEMORY; |
|
return -1; |
|
} |
|
_imaging_seek_pyFd(state->fd, SGI_HEADER_SIZE, SEEK_SET); |
|
if (_imaging_read_pyFd(state->fd, (char *)ptr, c->bufsize) != c->bufsize) { |
|
state->errcode = IMAGING_CODEC_UNKNOWN; |
|
return -1; |
|
} |
We allocated memory for
ptr but didn't free it before
return -1; on line 199.
Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
Author A. Voronin.
There is a possible memory leak:
Pillow/src/libImaging/SgiRleDecode.c
Lines 191 to 200 in 8d0a6d0
We allocated memory for
ptrbut didn't free it beforereturn -1;on line 199.Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
Author A. Voronin.