mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-01 00:18:15 +01:00
Plug a memory leak. Once any given package (e.g. perl) was installed
we would leak a saved screen for every other package we tried to install that listed perl as one of its dependencies. When installing things like gnome and kde that wound up being a LOT of leaked memory. Insta-MFC request coming so this can be tested as part of 6.3-RC2... Testing help from: kris
This commit is contained in:
parent
03a3a9133f
commit
c0523a3bb5
@ -687,7 +687,7 @@ index_extract(Device *dev, PkgNodePtr top, PkgNodePtr who, Boolean depended)
|
||||
int status = DITEM_SUCCESS;
|
||||
PkgNodePtr tmp2;
|
||||
IndexEntryPtr id = who->data;
|
||||
WINDOW *w = savescr();
|
||||
WINDOW *w;
|
||||
|
||||
/*
|
||||
* Short-circuit the package dependency checks. We're already
|
||||
@ -702,6 +702,7 @@ index_extract(Device *dev, PkgNodePtr top, PkgNodePtr who, Boolean depended)
|
||||
if (id->installed == 1)
|
||||
return DITEM_SUCCESS;
|
||||
|
||||
w = savescr();
|
||||
if (id && id->deps && strlen(id->deps)) {
|
||||
char t[2048 * 8], *cp, *cp2;
|
||||
|
||||
@ -744,6 +745,7 @@ index_extract(Device *dev, PkgNodePtr top, PkgNodePtr who, Boolean depended)
|
||||
dev->volume, id->volume);
|
||||
DEVICE_INIT(mediaDevice);
|
||||
} else {
|
||||
restorescr(w);
|
||||
return DITEM_FAILURE;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user