• Christian Persch's avatar
    Plug a mem leak · 54673644
    Christian Persch authored
    Don't leak the list entries of RsvgDefs:to-resolve when parsing the
    file fails.
    
    ==17296== 13,627 (8 direct, 13,619 indirect) bytes in 1 blocks are definitely lost in loss record 210 of 211
    ==17296==    at 0x402AD89: malloc (vg_replace_malloc.c:236)
    ==17296==    by 0x4565BDA: standard_malloc (gmem.c:85)
    ==17296==    by 0x4565F80: g_malloc (gmem.c:159)
    ==17296==    by 0x4579C8D: g_slice_alloc (gslice.c:822)
    ==17296==    by 0x457AD5A: g_slist_prepend (gslist.c:267)
    ==17296==    by 0x403952F: rsvg_defs_add_resolver (rsvg-defs.c:183)
    ==17296==    by 0x404F8CC: rsvg_node_use_set_atts (rsvg-structure.c:434)
    ==17296==    by 0x4057E7C: rsvg_node_set_atts (rsvg-base.c:1939)
    ==17296==    by 0x4057F08: rsvg_standard_element_start (rsvg-base.c:265)
    ==17296==    by 0x40588F8: rsvg_start_element (rsvg-base.c:659)
    54673644
rsvg-defs.c 5.4 KB