Skip to content

Commit b570107

Browse files
committed
Fix new leak in ft2font introduced in matplotlib#22604
1 parent d7828f3 commit b570107

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ft2font_wrapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ static unsigned long read_from_file_callback(FT_Stream stream,
291291
return 1; // Non-zero signals error, when count == 0.
292292
}
293293
}
294-
return PyLong_AsUnsignedLong(PyLong_FromSsize_t(n_read));
294+
return (unsigned long)n_read;
295295
}
296296

297297
static void close_file_callback(FT_Stream stream)

0 commit comments

Comments
 (0)