diff --git a/usr.sbin/sysinstall/index.c b/usr.sbin/sysinstall/index.c index 7a9443a73da4..a55b54113dbf 100644 --- a/usr.sbin/sysinstall/index.c +++ b/usr.sbin/sysinstall/index.c @@ -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; } }