* src/sfnt/pngshim.c (Load_SBit_Png): Free `rows` once later.

wl/meson-logging
Alexei Podtelezhnikov 4 years ago
parent b0729b8fbb
commit e9c50fa77d
  1. 4
      ChangeLog
  2. 3
      src/sfnt/pngshim.c

@ -1,3 +1,7 @@
2021-03-16 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/sfnt/pngshim.c (Load_SBit_Png): Free `rows` once later.
2021-03-16 Ben Wagner <bungeman@google.com>
[sfnt] Fix memory leak in png loading.

@ -441,11 +441,10 @@
png_read_image( png, rows );
FT_FREE( rows );
png_read_end( png, info );
DestroyExit:
/* even if reading fails with longjmp, rows must be freed */
FT_FREE( rows );
png_destroy_read_struct( &png, &info, NULL );
FT_Stream_Close( &stream );

Loading…
Cancel
Save