Fixed use after free bug.
This commit is contained in:
parent
effca83150
commit
630136a1eb
|
@ -224,9 +224,9 @@ bool rtlsdrOpen(void) {
|
||||||
closest = i;
|
closest = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rtlsdr_set_tuner_gain(RTLSDR.dev, gains[closest]);
|
||||||
free(gains);
|
free(gains);
|
||||||
|
|
||||||
rtlsdr_set_tuner_gain(RTLSDR.dev, gains[closest]);
|
|
||||||
fprintf(stderr, "rtlsdr: tuner gain set to %.1f dB\n",
|
fprintf(stderr, "rtlsdr: tuner gain set to %.1f dB\n",
|
||||||
rtlsdr_get_tuner_gain(RTLSDR.dev)/10.0);
|
rtlsdr_get_tuner_gain(RTLSDR.dev)/10.0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue