Commit 75a1834d authored by ivoire's avatar ivoire
Browse files

cdda/info: fix memleaks.

parent 943b5ccc
......@@ -73,15 +73,15 @@ GetCDDBInfo( access_t *p_access, cdda_data_t *p_cdda )
goto cddb_destroy;
}
cddb_set_email_address( conn,
config_GetPsz( p_access,
MODULE_STRING "-cddb-email") );
cddb_set_server_name( conn,
config_GetPsz( p_access,
MODULE_STRING "-cddb-server") );
char* psz_email = config_GetPsz( p_access, MODULE_STRING "-cddb-email");
char* psz_srv_name = config_GetPsz( p_access, MODULE_STRING "-cddb-server");
cddb_set_email_address( conn, psz_email );
cddb_set_server_name( conn, psz_srv_name );
cddb_set_server_port(conn,
config_GetInt( p_access,
MODULE_STRING "-cddb-port") );
free( psz_email );
free( psz_srv_name );
/* Set the location of the local CDDB cache directory.
The default location of this directory is */
......@@ -89,9 +89,9 @@ GetCDDBInfo( access_t *p_access, cdda_data_t *p_cdda )
if (!config_GetInt( p_access, MODULE_STRING "-cddb-enable-cache" ))
cddb_cache_disable(conn);
cddb_cache_set_dir(conn,
config_GetPsz( p_access,
MODULE_STRING "-cddb-cachedir") );
char* psz_cache = config_GetPsz( p_access, MODULE_STRING "-cddb-cachedir");
cddb_cache_set_dir(conn, psz_cache );
free( psz_cache );
cddb_set_timeout(conn,
config_GetInt( p_access, MODULE_STRING "-cddb-timeout") );
......@@ -797,14 +797,14 @@ CDDAFormatTitle( const access_t *p_access, track_t i_track )
config_varname = MODULE_STRING "-cddb-title-format";
}
#endif /*HAVE_LIBCDDB*/
psz_name =
CDDAFormatStr( p_access, p_cdda,
config_GetPsz( p_access, config_varname ),
char* psz_config_varname = config_GetPsz( p_access, config_varname );
psz_name = CDDAFormatStr( p_access, p_cdda, psz_config_varname,
psz_mrl, i_track );
free(psz_mrl);
free( psz_config_varname );
free( psz_mrl );
return psz_name;
}
return(NULL);
return NULL;
}
static playlist_item_t *
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment