Memory leak full image when loading
When loading an SVG image via gdk_pixbuf_new_from_file
, librsvg appears to leak the whole image a single time.
==6151== 2,955,993 (160 direct, 2,955,833 indirect) bytes in 10 blocks are definitely lost in loss record 514 of 514
==6151== at 0x483877F: malloc (vg_replace_malloc.c:299)
==6151== by 0x61B40E6: alloc (alloc.rs:62)
==6151== by 0x61B40E6: exchange_malloc (alloc.rs:157)
==6151== by 0x61B40E6: new<rsvg_internals::tree::Tree> (boxed.rs:96)
==6151== by 0x61B40E6: rsvg_tree_new (tree.rs:39)
==6151== by 0x61946F7: standard_element_start (rsvg-load.c:313)
==6151== by 0x619550D: sax_start_element_cb (rsvg-load.c:636)
==6151== by 0x6AEAC94: xmlParseStartTag (parser.c:8549)
==6151== by 0x6AF2544: xmlParseTryOrFinish (parser.c:11345)
==6151== by 0x6AF33DA: xmlParseChunk (parser.c:12244)
==6151== by 0x619573F: write_impl (rsvg-load.c:980)
==6151== by 0x486E28E: gdk_pixbuf__svg_image_load_increment (io-svg.c:133)
==6151== by 0x48C7E40: generic_load_incrementally (gdk-pixbuf-io.c:991)
==6151== by 0x48CC5A1: gdk_pixbuf_new_from_file (gdk-pixbuf-io.c:1090)
==6151== by 0x109271: main (in /home/bebe/memleak-testproj/test)
According to my research, this isn't a problem in 2.42, but in 2.44.
I've created a new testproject to have an easy reproducer: https://gitlab.gnome.org/bebehei/memleak-testproj