fix multiple leaks in mountpoint parsing
@@ -525,9 +525,14 @@ static bool parseAndAddMountpoint (KeySet * mountpoints, KeySet * modules, KeySe
"The mountpoint '%s' (defined at '%s') is not allowed. Everything below '" KDB_SYSTEM_ELEKTRA
"' is reserved for use by Elektra.",
keyBaseName (root), keyName (root));
+
+ keyDel (elektraRoot);
return false;
}
+ keyDel (elektraRoot);
+ elektraRoot = NULL;
+
// load mountpoint level config
Key * lookupHelper = keyDup (root, KEY_CP_NAME);
@@ -654,6 +659,8 @@ KeySet * elektraMountpointsParse (KeySet * elektraKs, KeySet * modules, KeySet *
}
}
+ keyDel (mountpointsRoot);
+
if (error)
{
closeBackends (mountpoints, errorKey);
