free errMsg only if available

This commit is contained in:
dwarning 2020-02-23 20:39:44 +01:00
parent 646ac2dbcb
commit 565a0994b3
1 changed files with 2 additions and 1 deletions

View File

@ -35,6 +35,7 @@ CKTask(CKTcircuit *ckt, GENinstance *instance, int which, IFvalue *value, IFvalu
if (error && ft_ngdebug) {
printf("\nWarning: %s\n", errMsg);
}
FREE(errMsg);
if (errMsg)
FREE(errMsg);
return(error);
}