1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-21 22:47:09 +00:00

Fix defects detected by coverity scan

This commit is contained in:
Carles Fernandez 2017-06-07 15:02:14 +02:00
parent 2253b29bf1
commit 0b2b0fceac
2 changed files with 3 additions and 1 deletions

View File

@ -392,6 +392,7 @@ void readtec(const char *file, nav_t *nav, int opt)
if (!(fp = fopen(efiles[i], "r"))) if (!(fp = fopen(efiles[i], "r")))
{ {
trace(2, "ionex file open error %s\n", efiles[i]); trace(2, "ionex file open error %s\n", efiles[i]);
fclose(fp);
continue; continue;
} }
else else
@ -400,6 +401,7 @@ void readtec(const char *file, nav_t *nav, int opt)
if (readionexh(fp, lats, lons, hgts, &rb, &nexp, dcb, rms) <= 0.0) if (readionexh(fp, lats, lons, hgts, &rb, &nexp, dcb, rms) <= 0.0)
{ {
trace(2, "ionex file format error %s\n", efiles[i]); trace(2, "ionex file format error %s\n", efiles[i]);
fclose(fp);
continue; continue;
} }
/* read ionex body */ /* read ionex body */

View File

@ -369,7 +369,7 @@ int readsap(const char *file, gtime_t time, nav_t *nav)
pcv = searchpcv(i + 1, "", time, &pcvs); pcv = searchpcv(i + 1, "", time, &pcvs);
nav->pcvs[i] = pcv ? *pcv : pcv0; nav->pcvs[i] = pcv ? *pcv : pcv0;
} }
free(pcvs.pcv); free(pcv);
return 1; return 1;
} }