Skip to content

Commit 19af2b3

Browse files
authored
Fix a small memleak in write_to_buffer() (#497)
1 parent 6c983c3 commit 19af2b3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: pyvips/vimage.py

+1
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,7 @@ def write_to_buffer(self, format_string, **kwargs):
849849
format_string = _to_bytes(format_string)
850850

851851
filename = vips_lib.vips_filename_get_filename(format_string)
852+
filename = ffi.gc(filename, glib_lib.g_free)
852853

853854
pointer = vips_lib.vips_filename_get_options(format_string)
854855
options = _to_string_copy(pointer)

0 commit comments

Comments
 (0)