Corrected a failure (in the code for many a decade) to properly
clean up memory after running "ext2spice". There are apparently still memory leaks somewhere, difficult to diagnose with valgrind, but this fix removes the most substantial leakage and allows "ext2spice" to be run continuously, at least for a while.
This commit is contained in:
parent
859879ce5d
commit
82f280e23e
|
|
@ -162,6 +162,12 @@ EFDone()
|
|||
}
|
||||
HashKill(&efDevParamTable);
|
||||
|
||||
HashStartSearch(&hs);
|
||||
while (he = HashNext(&efFreeHashTable, &hs))
|
||||
{
|
||||
/* Keys of this table are entries to be free'd */
|
||||
freeMagic(he->h_key.h_ptr);
|
||||
}
|
||||
HashKill(&efFreeHashTable);
|
||||
|
||||
/* Final cleanup */
|
||||
|
|
|
|||
|
|
@ -351,8 +351,16 @@ ExtGetDevInfo(idx, devnameptr, devtypeptr, s_rclassptr, d_rclassptr,
|
|||
}
|
||||
if (found == TRUE) break;
|
||||
}
|
||||
if (t == DBNumTypes) return FALSE;
|
||||
if (devptr == NULL) return FALSE;
|
||||
if (t == DBNumTypes)
|
||||
{
|
||||
freeMagic(uniquenamelist);
|
||||
return FALSE;
|
||||
}
|
||||
if (devptr == NULL)
|
||||
{
|
||||
freeMagic(uniquenamelist);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (devnameptr) *devnameptr = locdname;
|
||||
if (subnameptr) *subnameptr = devptr->exts_deviceSubstrateName;
|
||||
|
|
|
|||
Loading…
Reference in New Issue