Fix to new ext2spice code to prevent a crash condition when

multiple instances of a port name are present.
This commit is contained in:
Tim Edwards 2021-10-05 13:25:39 -04:00
parent c4221889ed
commit ff08df0eed
1 changed files with 2 additions and 1 deletions

View File

@ -1821,7 +1821,8 @@ topVisit(def, doStub)
{
hep = HashFind(&portNameTable, pname);
HashSetValue(hep, (ClientData)(pointertype)nodeName->efnn_port);
sorted_ports[portidx] = StrDup((char **)NULL, pname);
if (sorted_ports[portidx] == NULL)
sorted_ports[portidx] = StrDup((char **)NULL, pname);
}
else
{