Discussion:
[Viking-devel] Memory leak in vikmapniklayer.c
Kamil Ignacak
2016-12-11 22:43:16 UTC
Permalink
Hello,

I think that I've found a small memory leak in vikmapniklayer.c, can you
please take a look?

The leak is in carto_load() function, line 505, the "msg" pointer is
never deallocated:
if ( vw ) {
gchar *msg = g_strdup_printf( "%s: %s", _("Running"), command );
vik_window_statusbar_update( vw, msg, VIK_STATUSBAR_INFO );
vik_window_set_busy_cursor( vw );
}

Best regards,
Kamil
Robert Norris
2016-12-11 23:08:20 UTC
Permalink
Yes that allocation should be freed.


Thanks for finding these issues.


--
Be Seeing You - Rob.
If at first you don't succeed,
then skydiving isn't for you.
________________________________
From: Kamil Ignacak <***@wp.pl>
Sent: 11 December 2016 22:43:16
To: viking-***@lists.sourceforge.net
Subject: [Viking-devel] Memory leak in vikmapniklayer.c

Hello,

I think that I've found a small memory leak in vikmapniklayer.c, can you
please take a look?

The leak is in carto_load() function, line 505, the "msg" pointer is
never deallocated:
if ( vw ) {
gchar *msg = g_strdup_printf( "%s: %s", _("Running"), command );
vik_window_statusbar_update( vw, msg, VIK_STATUSBAR_INFO );
vik_window_set_busy_cursor( vw );
}

Best regards,
Kamil

Loading...