#438 [lxterminal] Fix memleak after g_get_current_dir()

open
nobody
None
5
2013-02-13
2013-02-13
dforsi
No

The string returned by g_get_current_dir() must be freed.

Output from valgrind shows a leak:
==16376== 49 bytes in 1 blocks are definitely lost in loss record 363 of 549
==16376== at 0x4028308: malloc (vg_replace_malloc.c:263)
==16376== by 0x409D42A: ??? (in /lib/i386-linux-gnu/libglib-2.0.so.0.3200.4)
==16376== by 0x409D7A2: g_malloc (in /lib/i386-linux-gnu/libglib-2.0.so.0.3200.4)
==16376== by 0x40B44C8: g_strdup (in /lib/i386-linux-gnu/libglib-2.0.so.0.3200.4)
==16376== by 0x40859A6: g_get_current_dir (in /lib/i386-linux-gnu/libglib-2.0.so.0.3200.4)
==16376== by 0x804D764: lxterminal_socket_initialize (unixsocket.c:231)
==16376== by 0x804CE4D: main (lxterminal.c:1604)

Related

lxterminal: lxterminal

Discussion

  • dforsi

    dforsi - 2013-02-13
    • summary: Fix memleak of string returned by g_get_current_dir() --> [lxterminal] Fix memleak after g_get_current_dir()
     

    Related

    lxterminal: lxterminal


Log in to post a comment.