Commit 75a1834d authored by Rémi Duraffort's avatar Rémi Duraffort

cdda/info: fix memleaks.

parent 943b5ccc
...@@ -73,15 +73,15 @@ GetCDDBInfo( access_t *p_access, cdda_data_t *p_cdda ) ...@@ -73,15 +73,15 @@ GetCDDBInfo( access_t *p_access, cdda_data_t *p_cdda )
goto cddb_destroy; goto cddb_destroy;
} }
cddb_set_email_address( conn, char* psz_email = config_GetPsz( p_access, MODULE_STRING "-cddb-email");
config_GetPsz( p_access, char* psz_srv_name = config_GetPsz( p_access, MODULE_STRING "-cddb-server");
MODULE_STRING "-cddb-email") ); cddb_set_email_address( conn, psz_email );
cddb_set_server_name( conn, cddb_set_server_name( conn, psz_srv_name );
config_GetPsz( p_access,
MODULE_STRING "-cddb-server") );
cddb_set_server_port(conn, cddb_set_server_port(conn,
config_GetInt( p_access, config_GetInt( p_access,
MODULE_STRING "-cddb-port") ); MODULE_STRING "-cddb-port") );
free( psz_email );
free( psz_srv_name );
/* Set the location of the local CDDB cache directory. /* Set the location of the local CDDB cache directory.
The default location of this directory is */ The default location of this directory is */
...@@ -89,9 +89,9 @@ GetCDDBInfo( access_t *p_access, cdda_data_t *p_cdda ) ...@@ -89,9 +89,9 @@ GetCDDBInfo( access_t *p_access, cdda_data_t *p_cdda )
if (!config_GetInt( p_access, MODULE_STRING "-cddb-enable-cache" )) if (!config_GetInt( p_access, MODULE_STRING "-cddb-enable-cache" ))
cddb_cache_disable(conn); cddb_cache_disable(conn);
cddb_cache_set_dir(conn, char* psz_cache = config_GetPsz( p_access, MODULE_STRING "-cddb-cachedir");
config_GetPsz( p_access, cddb_cache_set_dir(conn, psz_cache );
MODULE_STRING "-cddb-cachedir") ); free( psz_cache );
cddb_set_timeout(conn, cddb_set_timeout(conn,
config_GetInt( p_access, MODULE_STRING "-cddb-timeout") ); config_GetInt( p_access, MODULE_STRING "-cddb-timeout") );
...@@ -797,14 +797,14 @@ CDDAFormatTitle( const access_t *p_access, track_t i_track ) ...@@ -797,14 +797,14 @@ CDDAFormatTitle( const access_t *p_access, track_t i_track )
config_varname = MODULE_STRING "-cddb-title-format"; config_varname = MODULE_STRING "-cddb-title-format";
} }
#endif /*HAVE_LIBCDDB*/ #endif /*HAVE_LIBCDDB*/
psz_name = char* psz_config_varname = config_GetPsz( p_access, config_varname );
CDDAFormatStr( p_access, p_cdda, psz_name = CDDAFormatStr( p_access, p_cdda, psz_config_varname,
config_GetPsz( p_access, config_varname ),
psz_mrl, i_track ); psz_mrl, i_track );
free(psz_mrl); free( psz_config_varname );
free( psz_mrl );
return psz_name; return psz_name;
} }
return(NULL); return NULL;
} }
static playlist_item_t * 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