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;
|
break;
|
||||||
|
|
||||||
case BSIM4v5_MOD_VERSION :
|
case BSIM4v5_MOD_VERSION :
|
||||||
|
if (mod->BSIM4v5version)
|
||||||
|
free(mod->BSIM4v5version);
|
||||||
mod->BSIM4v5version = value->sValue;
|
mod->BSIM4v5version = value->sValue;
|
||||||
mod->BSIM4v5versionGiven = TRUE;
|
mod->BSIM4v5versionGiven = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,7 @@ VSRCask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *
|
||||||
return (OK);
|
return (OK);
|
||||||
case VSRC_CURRENT:
|
case VSRC_CURRENT:
|
||||||
if (ckt->CKTcurrentAnalysis & DOING_AC) {
|
if (ckt->CKTcurrentAnalysis & DOING_AC) {
|
||||||
|
FREE(errMsg);
|
||||||
errMsg = TMALLOC(char, strlen(msg) + 1);
|
errMsg = TMALLOC(char, strlen(msg) + 1);
|
||||||
errRtn = "VSRCask";
|
errRtn = "VSRCask";
|
||||||
strcpy(errMsg,msg);
|
strcpy(errMsg,msg);
|
||||||
|
|
@ -100,6 +101,7 @@ VSRCask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *
|
||||||
return(OK);
|
return(OK);
|
||||||
case VSRC_POWER:
|
case VSRC_POWER:
|
||||||
if (ckt->CKTcurrentAnalysis & DOING_AC) {
|
if (ckt->CKTcurrentAnalysis & DOING_AC) {
|
||||||
|
FREE(errMsg);
|
||||||
errMsg = TMALLOC(char, strlen(msg) + 1);
|
errMsg = TMALLOC(char, strlen(msg) + 1);
|
||||||
errRtn = "VSRCask";
|
errRtn = "VSRCask";
|
||||||
strcpy(errMsg,msg);
|
strcpy(errMsg,msg);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue