mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-21 03:28:59 -04:00
Prevent a possible memory leak, patch by Mike W9MDB.
This commit is contained in:
parent
ce2e94de26
commit
c2883532ed
@ -146,6 +146,7 @@ unsigned long readwavfile(char *ptr_to_infile, int ntrmin, float *idat, float *q
|
||||
nr=fread(buf2,2,npoints,fp); //Read raw data
|
||||
fclose(fp);
|
||||
if( nr == 0 ) {
|
||||
free(buf2);
|
||||
fprintf(stderr, "No data in file '%s'\n", ptr_to_infile);
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user