From: Jonathan Neuschäfer Date: Mon, 18 Jul 2011 10:23:50 +0000 (+0200) Subject: add missing g_free in error path X-Git-Tag: release-0.19~7 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7c30dc05afbe80802f63372472aa836ec80ae409;p=ncmpc.git add missing g_free in error path cppcheck detected this little bug. --- diff --git a/src/screen_queue.c b/src/screen_queue.c index 67df4b5..37a6050 100644 --- a/src/screen_queue.c +++ b/src/screen_queue.c @@ -276,8 +276,10 @@ playlist_save(struct mpdclient *c, char *name, char *defaultname) /* send save command to mpd */ connection = mpdclient_get_connection(c); - if (connection == NULL) + if (connection == NULL) { + g_free(filename); return -1; + } filename_utf8 = locale_to_utf8(filename); if (!mpd_run_save(connection, filename_utf8)) {