changeset 4114:3218e86beed7

Fixes memory leak in playlist_add_files() function when using extension probing and trying to add file with unknown extension. (Bugzilla #44)
author Jussi Judin <jjudin+audacious@iki.fi>
date Tue, 25 Dec 2007 01:16:26 -0600
parents 1e8498de4acc
children e99284bb7936
files src/audacious/playlist.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/playlist.c	Tue Dec 25 01:09:27 2007 -0600
+++ b/src/audacious/playlist.c	Tue Dec 25 01:16:26 2007 -0600
@@ -967,6 +967,8 @@
             if(cfg.use_extension_probing) {
                 if(ext_flag == EXT_TRUE)
                     list = g_list_prepend(list, filename);
+                else // ext_flag == EXT_FALSE => extension isn't known
+                    g_free(filename);
             }
             else
                 list = g_list_prepend(list, filename);