resource leak fix.

detected by
Covertity's checker:
CID: 154
Checker: RESOURCE_LEAK
Description: Returned without freeing storage "cddb_info"


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18226 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
gpoirier 2006-04-23 15:14:03 +00:00
parent bafd517f81
commit 152d7ed02c
1 changed files with 3 additions and 0 deletions

View File

@ -151,6 +151,7 @@ static int open_cdda(stream_t *st,int m, void* opts, int* file_format) {
if(!cdd) {
mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_MPDEMUX_CDDA_CantOpenCDDADevice);
m_struct_free(&stream_opts,opts);
free(cddb_info);
return STREAM_ERROR;
}
@ -167,6 +168,7 @@ static int open_cdda(stream_t *st,int m, void* opts, int* file_format) {
mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_MPDEMUX_CDDA_CantOpenDisc);
cdda_close(cdd);
m_struct_free(&stream_opts,opts);
free(cddb_info);
return STREAM_ERROR;
}
@ -222,6 +224,7 @@ static int open_cdda(stream_t *st,int m, void* opts, int* file_format) {
free(priv);
cd_info_free(cd_info);
m_struct_free(&stream_opts,opts);
free(cddb_info);
return STREAM_ERROR;
}