patch from Honza Horak using Coverity's static analysis tool.
This commit is contained in:
@@ -281,6 +281,7 @@ verify_read_command(cdrom_drive_t *d)
|
||||
|
||||
if(!audioflag){
|
||||
cdmessage(d,"\tCould not find any audio tracks on this disk.\n");
|
||||
free(buff);
|
||||
return(-403);
|
||||
}
|
||||
|
||||
|
||||
@@ -58,8 +58,8 @@ data_bigendianp(cdrom_drive_t *d)
|
||||
float *a=calloc(1024,sizeof(float));
|
||||
float *b=calloc(1024,sizeof(float));
|
||||
long readsectors=5;
|
||||
int16_t *buff=malloc(readsectors*CDIO_CD_FRAMESIZE_RAW);
|
||||
memset(buff, 0, readsectors*CDIO_CD_FRAMESIZE_RAW);
|
||||
int16_t *buff=malloc(readsectors*CDIO_CD_FRAMESIZE_RAW*sizeof(int16_t));
|
||||
memset(buff, 0, readsectors*CDIO_CD_FRAMESIZE_RAW*sizeof(int16_t));
|
||||
|
||||
/* look at the starts of the audio tracks */
|
||||
/* if real silence, tool in until some static is found */
|
||||
|
||||
@@ -325,7 +325,6 @@ cdda_identify_device_cdio(CdIo_t *p_cdio, const char *psz_device,
|
||||
snprintf( d->drive_model, i_len, "%s %s %s %s",
|
||||
hw_info.psz_vendor, hw_info.psz_model, hw_info.psz_revision,
|
||||
description );
|
||||
free(description);
|
||||
} else {
|
||||
d->drive_model=malloc( i_len );
|
||||
snprintf( d->drive_model, i_len, "%s %s %s",
|
||||
@@ -337,5 +336,8 @@ cdda_identify_device_cdio(CdIo_t *p_cdio, const char *psz_device,
|
||||
}
|
||||
}
|
||||
|
||||
if (description)
|
||||
free(description);
|
||||
|
||||
return(d);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user