Fix memory leaks found by valgrind in the paranoia script.
This commit is contained in:
parent
dbf4c16bc0
commit
daad3fb3c5
|
|
@ -103,6 +103,8 @@ GENmodel *inMod)
|
|||
break;
|
||||
|
||||
case BSIM4v5_MOD_VERSION :
|
||||
if (mod->BSIM4v5version)
|
||||
free(mod->BSIM4v5version);
|
||||
mod->BSIM4v5version = value->sValue;
|
||||
mod->BSIM4v5versionGiven = TRUE;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ VSRCask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *
|
|||
return (OK);
|
||||
case VSRC_CURRENT:
|
||||
if (ckt->CKTcurrentAnalysis & DOING_AC) {
|
||||
FREE(errMsg);
|
||||
errMsg = TMALLOC(char, strlen(msg) + 1);
|
||||
errRtn = "VSRCask";
|
||||
strcpy(errMsg,msg);
|
||||
|
|
@ -100,6 +101,7 @@ VSRCask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *
|
|||
return(OK);
|
||||
case VSRC_POWER:
|
||||
if (ckt->CKTcurrentAnalysis & DOING_AC) {
|
||||
FREE(errMsg);
|
||||
errMsg = TMALLOC(char, strlen(msg) + 1);
|
||||
errRtn = "VSRCask";
|
||||
strcpy(errMsg,msg);
|
||||
|
|
|
|||
Loading…
Reference in New Issue