patch from Honza Horak using Coverity's static analysis tool.
This commit is contained in:
@@ -528,6 +528,7 @@ print_iso9660_recurse (CdIo_t *p_cdio, const char pathname[],
|
||||
if (NULL == p_entlist) {
|
||||
report( stderr, "Error getting above directory information\n" );
|
||||
free(translated_name);
|
||||
free(p_dirlist);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -342,7 +342,7 @@ callback(long int inpos, paranoia_cb_mode_t function)
|
||||
|
||||
if (callscript)
|
||||
fprintf(stderr, "##: %d [%s] @ %ld\n",
|
||||
function, ((int) function >= -2 && (int) function <= 13 ?
|
||||
function, ((int) function >= -2 && (int) function < 13 ?
|
||||
callback_strings[function+2] : ""),
|
||||
inpos);
|
||||
|
||||
@@ -1138,6 +1138,11 @@ main(int argc,char *argv[])
|
||||
if (optind+1<argc) {
|
||||
if (!strcmp(argv[optind+1],"-") ){
|
||||
out = dup(fileno(stdout));
|
||||
if(out==-1){
|
||||
report2("Cannot dupplicate stdout: %s",
|
||||
strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
if(batch)
|
||||
report("Are you sure you wanted 'batch' "
|
||||
"(-B) output with stdout?");
|
||||
|
||||
@@ -545,10 +545,13 @@ main(int argc, char *argv[])
|
||||
break;
|
||||
case READ_M1F2:
|
||||
blocklen=M2RAW_SECTOR_SIZE;
|
||||
break;
|
||||
case READ_M2F1:
|
||||
blocklen=CDIO_CD_FRAMESIZE;
|
||||
break;
|
||||
case READ_M2F2:
|
||||
blocklen=M2F2_SECTOR_SIZE;
|
||||
break;
|
||||
default: ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,6 +209,8 @@ print_iso9660_recurse (iso9660_t *p_iso, const char psz_path[])
|
||||
}
|
||||
|
||||
if (NULL == entlist) {
|
||||
free(translated_name);
|
||||
free(dirlist);
|
||||
report( stderr, "Error getting above directory information\n" );
|
||||
free(translated_name);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user