mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-22 14:17:43 +02:00
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:
+10
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user