Skip to content
Snippets Groups Projects
Commit 2949b658 authored by Thomas Guillem's avatar Thomas Guillem
Browse files

preparser: art: add missing alloc check

parent 03d7eefb
No related branches found
No related tags found
No related merge requests found
......@@ -66,8 +66,20 @@ static char* ArtCacheGetDirPath( const char *psz_arturl, const char *psz_artist,
if( !EMPTY_STR(psz_artist) && !EMPTY_STR(psz_album) )
{
char *psz_album_sanitized = strdup( psz_album );
if (!psz_album_sanitized)
{
free( psz_cachedir );
return NULL;
}
filename_sanitize( psz_album_sanitized );
char *psz_artist_sanitized = strdup( psz_artist );
if (!psz_artist_sanitized)
{
free( psz_cachedir );
free( psz_album_sanitized );
return NULL;
}
filename_sanitize( psz_artist_sanitized );
if( asprintf( &psz_dir, "%s" DIR_SEP "art" DIR_SEP "artistalbum"
DIR_SEP "%s" DIR_SEP "%s", psz_cachedir,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment