Skip to content

settings: Fix string leak in setStringValue

correctmost requested to merge correctmost/xfwm4:cm/fix-string-value-leak into master

Example leak report

336 bytes in 24 blocks are definitely lost in loss record 9,235 of 9,821
   at 0x48447A8: malloc (vg_replace_malloc.c:446)
   by 0x5AB1661: g_malloc (gmem.c:100)
   by 0x5ACADD3: g_strdup (gstrfuncs.c:323)
   by 0x5A348B3: g_strdup_inline (gstrfuncs.h:321)
   by 0x5A348B3: g_value_set_string (gvaluetypes.c:1035)
   by 0x1413A6: setStringValue (parserc.c:175)
   by 0x148046: loadTheme (settings.c:394)
   by 0x148046: loadSettings (settings.c:773)
   by 0x14AD7F: initSettings (settings.c:1104)
   by 0x137715: initialize (main.c:542)
   by 0x137715: main (main.c:702)

Testing

  • No issues were detected when testing the patch with Valgrind

Merge request reports

Loading