Fix +: and -: memory leak.

This commit is contained in:
Wilson Snyder 2012-05-29 23:16:13 -04:00
parent e12bf35996
commit 5fad666678

View File

@ -345,6 +345,10 @@ private:
}
UINFO(6," new "<<newp<<endl);
nodep->replaceWith(newp); pushDeletep(nodep); nodep=NULL;
// delete whataver we didn't use in reconstruction
if (!fromp->backp()) pushDeletep(fromp); fromp=NULL;
if (!rhsp->backp()) pushDeletep(rhsp); rhsp=NULL;
if (!widthp->backp()) pushDeletep(widthp); widthp=NULL;
}
else { // NULL=bad extract, or unknown node type
nodep->v3error("Illegal +: or -: select; variable already selected, or bad dimension");