Coverity fixes

This commit is contained in:
dmh 2014-08-17 14:12:19 -06:00
parent 46063247cb
commit b274c6f6dc
2 changed files with 13 additions and 13 deletions

View File

@ -416,10 +416,10 @@ save = (DCEnode*)varaprojection;
if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto fail;}
fail:
if(vars != null) nclistfree(vars);
if(varaprojection != null) dcefree((DCEnode*)varaprojection);
if(fetchconstraint != null) dcefree((DCEnode*)fetchconstraint);
if(varainfo != null) freegetvara(varainfo);
if(vars != NULL) nclistfree(vars);
if(varaprojection != NULL) dcefree((DCEnode*)varaprojection);
if(fetchconstraint != NULL) dcefree((DCEnode*)fetchconstraint);
if(varainfo != NULL) freegetvara(varainfo);
if(ocstat != OC_NOERR) ncstat = ocerrtoncerr(ocstat);
//if(varainfo) freegetvara(varainfo);
return THROW(ncstat);
@ -984,7 +984,7 @@ extractstring(
free(s);
}
done:
if(strings != null) nclistfree(strings);
if(strings != NULL) nclistfree(strings);
if(ocstat != OC_NOERR) ncstat = ocerrtoncerr(ocstat);
return THROW(ncstat);
}

View File

@ -581,7 +581,7 @@ fprintf(stderr,"ncdap3: final constraint: %s\n",dapcomm->oc.url->constraint);
done:
if(drno != NULL) NCD2_close(drno->ext_ncid);
ncstat = ocerrtoncerr(ocstat);
if(ocstat != OC_NOERR) ncstat = ocerrtoncerr(ocstat);
return THROW(ncstat);
}
@ -1596,8 +1596,8 @@ fprintf(stderr,"sequencesize: %s = %lu\n",seq->ocname,(unsigned long)seqsize);
/* throw away the fetch'd trees */
unattach(dapcomm->cdf.ddsroot);
freecdfroot(dxdroot);
#if 0
Note sure what this is doing?
#if 1
/*Note sure what this is doing?*/
if(ncstat != NC_NOERR) {
/* Cannot get DATADDDS*/
char* code;
@ -1617,7 +1617,7 @@ Note sure what this is doing?
fail:
ncbytesfree(seqcountconstraints);
oc_data_free(conn,rootcontent);
ncstat = ocerrtoncerr(ocstat);
if(ocstat != OC_NOERR) ncstat = ocerrtoncerr(ocstat);
return ncstat;
}
@ -1715,7 +1715,7 @@ countsequence(NCDAPCOMMON* dapcomm, CDFnode* xseq, size_t* sizep)
done:
nclistfree(path);
ncstat = ocerrtoncerr(ocstat);
if(ocstat != OC_NOERR) ncstat = ocerrtoncerr(ocstat);
return THROW(ncstat);
}
@ -1747,7 +1747,7 @@ freeNCDAPCOMMON(NCDAPCOMMON* dapcomm)
return NC_NOERR;
}
static int
static size_t
fieldindex(CDFnode* parent, CDFnode* child)
{
unsigned int i;
@ -2007,7 +2007,7 @@ fprintf(stderr,"full template:\n%s",dumptree(dapcomm->cdf.fullddsroot));
done:
nullfree(ce);
ncstat = ocerrtoncerr(ocstat);
if(ocstat != OC_NOERR) ncstat = ocerrtoncerr(ocstat);
return ncstat;
}
@ -2061,7 +2061,7 @@ fprintf(stderr,"constrained:\n%s",dumptree(dapcomm->cdf.ddsroot));
fail:
nullfree(ce);
ncstat = ocerrtoncerr(ocstat);
if(ocstat != OC_NOERR) ncstat = ocerrtoncerr(ocstat);
return ncstat;
}