sysctl: Fixing memory leaks in PreloadSystem()

This commit is contained in:
Jaromir Capik 2014-01-02 19:49:36 +01:00
parent 69de8db3e2
commit 8622b582da

View File

@ -645,6 +645,13 @@ static int PreloadSystem(void)
printf(_("* Applying %s ...\n"), DEFAULT_PRELOAD);
rc |= Preload(DEFAULT_PRELOAD);
}
/* cleaning */
for (i = 0; i < ncfgs; ++i) {
free(cfgs[i]);
}
if (cfgs) free(cfgs);
return rc;
}