Skip to content

Commit ea15e0e

Browse files
authored
Merge pull request #8413 from radarhere/sgirle_memory
2 parents 747fdf5 + 851449e commit ea15e0e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libImaging/SgiRleDecode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ ImagingSgiRleDecode(Imaging im, ImagingCodecState state, UINT8 *buf, Py_ssize_t
195195
}
196196
_imaging_seek_pyFd(state->fd, SGI_HEADER_SIZE, SEEK_SET);
197197
if (_imaging_read_pyFd(state->fd, (char *)ptr, c->bufsize) != c->bufsize) {
198+
free(ptr);
198199
state->errcode = IMAGING_CODEC_UNKNOWN;
199200
return -1;
200201
}

0 commit comments

Comments
 (0)