mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-23 18:02:29 -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
|
nr=fread(buf2,2,npoints,fp); //Read raw data
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
if( nr == 0 ) {
|
if( nr == 0 ) {
|
||||||
|
free(buf2);
|
||||||
fprintf(stderr, "No data in file '%s'\n", ptr_to_infile);
|
fprintf(stderr, "No data in file '%s'\n", ptr_to_infile);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user