mapper: fix memory leak when playlist_directory is not set
Don't allocate the file name before the playlist_dir==NULL check.
This commit is contained in:
parent
7162fe85ce
commit
23e46b38ca
1
NEWS
1
NEWS
@ -3,6 +3,7 @@ ver 0.15.7 (2009/??/??)
|
|||||||
- id3: fix ID3v1 charset conversion
|
- id3: fix ID3v1 charset conversion
|
||||||
* decoders:
|
* decoders:
|
||||||
- ffmpeg: don't try to force stereo
|
- ffmpeg: don't try to force stereo
|
||||||
|
* mapper: fix memory leak when playlist_directory is not set
|
||||||
|
|
||||||
|
|
||||||
ver 0.15.6 (2009/11/18)
|
ver 0.15.6 (2009/11/18)
|
||||||
|
@ -221,12 +221,12 @@ map_spl_path(void)
|
|||||||
char *
|
char *
|
||||||
map_spl_utf8_to_fs(const char *name)
|
map_spl_utf8_to_fs(const char *name)
|
||||||
{
|
{
|
||||||
char *filename = g_strconcat(name, PLAYLIST_FILE_SUFFIX, NULL);
|
char *filename, *path;
|
||||||
char *path;
|
|
||||||
|
|
||||||
if (playlist_dir == NULL)
|
if (playlist_dir == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
filename = g_strconcat(name, PLAYLIST_FILE_SUFFIX, NULL);
|
||||||
path = g_build_filename(playlist_dir, filename, NULL);
|
path = g_build_filename(playlist_dir, filename, NULL);
|
||||||
g_free(filename);
|
g_free(filename);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user