update: fixed memory leak during container scan
The return value of map_directory_child_fs() must be freed.
This commit is contained in:
@@ -459,17 +459,20 @@ update_container_file( struct directory* directory,
|
||||
while ((vtrack = plugin->container_scan(pathname, ++tnum)) != NULL)
|
||||
{
|
||||
struct song* song = song_file_new(vtrack, contdir);
|
||||
char *child_path_fs;
|
||||
|
||||
// shouldn't be necessary but it's there..
|
||||
song->mtime = st->st_mtime;
|
||||
|
||||
song->tag = plugin->tag_dup(map_directory_child_fs(contdir, vtrack));
|
||||
child_path_fs = map_directory_child_fs(contdir, vtrack);
|
||||
g_free(vtrack);
|
||||
|
||||
song->tag = plugin->tag_dup(child_path_fs);
|
||||
g_free(child_path_fs);
|
||||
|
||||
songvec_add(&contdir->songs, song);
|
||||
|
||||
modified = true;
|
||||
|
||||
g_free(vtrack);
|
||||
}
|
||||
|
||||
g_free(pathname);
|
||||
|
Reference in New Issue
Block a user