fixed leak in event of null paramter

This commit is contained in:
Ed Hartnett 2017-11-14 09:34:26 -07:00
parent 013151edc6
commit a8d5323083

View File

@ -166,8 +166,10 @@ NC_parsefilterspec(const char* spec, unsigned int* idp, size_t* nparamsp, unsign
/* Now return results */
if(idp) *idp = id;
if(nparamsp) *nparamsp = nparams;
if(paramsp) *paramsp = ulist;
ulist = NULL; /* avoid duplicate free */
if(paramsp) {
*paramsp = ulist;
ulist = NULL; /* avoid duplicate free */
}
if(sdata) free(sdata);
if(ulist) free(ulist);
return 1;