kopia lustrzana https://github.com/Hamlib/Hamlib
Fix FILE* leak in readADC.c
rodzic
68f5a7edd7
commit
2bb002a4bc
|
@ -47,6 +47,7 @@ int read_calibration(int buf[NUM_CHANNELS][2])
|
|||
|
||||
if (fread(cal, NUM_CHANNELS * 4, 1, f) == 1)
|
||||
{
|
||||
fclose(f);
|
||||
for (j = 0; j < 2; j++)
|
||||
for (i = 0; i < NUM_CHANNELS; i++)
|
||||
{
|
||||
|
@ -67,6 +68,8 @@ int read_calibration(int buf[NUM_CHANNELS][2])
|
|||
|
||||
empty_calibration:
|
||||
|
||||
fclose(f);
|
||||
|
||||
printf("/etc/ADC-calibration.dat not found or it's not readable\n");
|
||||
|
||||
return 0;
|
||||
|
|
Ładowanie…
Reference in New Issue