update: free temporary string in container scan (memleak)
The return value of map_directory_child_fs() must be freed.
This commit is contained in:
parent
1c4f407a6d
commit
5d6f7803e1
1
NEWS
1
NEWS
|
@ -7,6 +7,7 @@ ver 0.15.2 (2009/??/??)
|
||||||
- flac: parse all replaygain tags
|
- flac: parse all replaygain tags
|
||||||
- flac: don't allocate cuesheet twice (memleak)
|
- flac: don't allocate cuesheet twice (memleak)
|
||||||
* update: free empty path string (memleak)
|
* update: free empty path string (memleak)
|
||||||
|
* update: free temporary string in container scan (memleak)
|
||||||
|
|
||||||
|
|
||||||
ver 0.15.1 (2009/07/15)
|
ver 0.15.1 (2009/07/15)
|
||||||
|
|
|
@ -430,7 +430,7 @@ update_container_file( struct directory* directory,
|
||||||
{
|
{
|
||||||
char* vtrack = NULL;
|
char* vtrack = NULL;
|
||||||
unsigned int tnum = 0;
|
unsigned int tnum = 0;
|
||||||
const char* pathname = map_directory_child_fs(directory, name);
|
char* pathname = map_directory_child_fs(directory, name);
|
||||||
struct directory* contdir = dirvec_find(&directory->children, name);
|
struct directory* contdir = dirvec_find(&directory->children, name);
|
||||||
|
|
||||||
// directory exists already
|
// directory exists already
|
||||||
|
@ -446,9 +446,11 @@ update_container_file( struct directory* directory,
|
||||||
|
|
||||||
modified = true;
|
modified = true;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
|
g_free(pathname);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
contdir = make_subdir(directory, name);
|
contdir = make_subdir(directory, name);
|
||||||
contdir->mtime = st->st_mtime;
|
contdir->mtime = st->st_mtime;
|
||||||
|
@ -473,6 +475,8 @@ update_container_file( struct directory* directory,
|
||||||
g_free(vtrack);
|
g_free(vtrack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_free(pathname);
|
||||||
|
|
||||||
if (tnum == 1)
|
if (tnum == 1)
|
||||||
{
|
{
|
||||||
delete_directory(contdir);
|
delete_directory(contdir);
|
||||||
|
|
Loading…
Reference in New Issue