patch from Honza Horak using Coverity's static analysis tool.

This commit is contained in:
rocky
2011-05-30 15:19:22 -04:00
parent 9be0980337
commit 940b7cd848
20 changed files with 52 additions and 28 deletions

View File

@@ -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;
}

View File

@@ -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?");

View File

@@ -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: ;
}
}

View File

@@ -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;