Skip to content

Commit

Permalink
Fix a small memleak in write_to_buffer() (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke authored Aug 26, 2024
1 parent 6c983c3 commit 19af2b3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pyvips/vimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ def write_to_buffer(self, format_string, **kwargs):
format_string = _to_bytes(format_string)

filename = vips_lib.vips_filename_get_filename(format_string)
filename = ffi.gc(filename, glib_lib.g_free)

pointer = vips_lib.vips_filename_get_options(format_string)
options = _to_string_copy(pointer)
Expand Down

0 comments on commit 19af2b3

Please sign in to comment.