From a2687d4385e3cfc083598a7340766b5d3055df1c Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Tue, 14 Mar 2023 12:53:22 -0400 Subject: [PATCH] Corrected an issue from the last commit, which is that the default ground node name (which is static) gets put on the node list and is improperly deallocated. Corrected by simply allocating the string for the default substrate node instead of using the static string. --- VERSION | 2 +- calma/CalmaRdcl.c | 2 +- ext2spice/ext2hier.c | 2 +- ext2spice/ext2spice.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index 821e3c85..099f29de 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.379 +8.3.380 diff --git a/calma/CalmaRdcl.c b/calma/CalmaRdcl.c index 6405f857..bdbbf45c 100644 --- a/calma/CalmaRdcl.c +++ b/calma/CalmaRdcl.c @@ -359,7 +359,7 @@ calmaParseStructure(filename) int mfactor; int locPolygonCount; OFFTYPE filepos; - bool was_called; + bool was_called = FALSE; bool was_initialized; bool predefined; bool do_flatten; diff --git a/ext2spice/ext2hier.c b/ext2spice/ext2hier.c index 7ad50c99..518221d1 100644 --- a/ext2spice/ext2hier.c +++ b/ext2spice/ext2hier.c @@ -2132,7 +2132,7 @@ esHierVisit(hc, cdata) /* Find the substrate node */ EFHierVisitNodes(hcf, spcsubHierVisit, (ClientData)&resstr); if (resstr == NULL) - resstr = esSpiceDefaultGnd; + resstr = StrDup((char **)NULL, esSpiceDefaultGnd); /* Output lumped capacitance and resistance to substrate */ esSpiceCapNode = resstr; diff --git a/ext2spice/ext2spice.c b/ext2spice/ext2spice.c index 5ac9f116..802c4209 100644 --- a/ext2spice/ext2spice.c +++ b/ext2spice/ext2spice.c @@ -1124,7 +1124,7 @@ runexttospice: /* Visit nodes to find the substrate node */ EFVisitNodes(spcsubVisit, (ClientData)&substr); if (substr == NULL) - substr = esSpiceDefaultGnd; + substr = StrDup((char **)NULL, esSpiceDefaultGnd); esSpiceCapNode = substr; EFVisitNodes(spcnodeVisit, (ClientData) NULL); @@ -1296,7 +1296,7 @@ main(argc, argv) EFVisitResists(spcresistVisit, (ClientData) NULL); EFVisitSubcircuits(subcktVisit, (ClientData) NULL); - esSpiceCapNode = esSpiceDefaultGnd; + esSpiceCapNode = StrDup((char **)NULL, esSpiceDefaultGnd); EFVisitNodes(spcnodeVisit, (ClientData) NULL); if ((esDoSubckt == TRUE) || (locDoSubckt == TRUE))