Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d6d64df

Browse files
committed
Merge pull request #5372 from QuLogic/cairo-memleak
Fix Cairo memleak
2 parents 5da9ed5 + 5545d21 commit d6d64df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_image_wrapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ static PyObject *PyImage_color_conv(PyImage *self, PyObject *args, PyObject *kwd
177177
free(buff));
178178

179179
PyObject *result = PyByteArray_FromStringAndSize((const char *)buff, size);
180+
free(buff);
180181
if (result == NULL) {
181-
free(buff);
182182
return NULL;
183183
}
184184

0 commit comments

Comments
 (0)