diff options
author | jkh <jkh@FreeBSD.org> | 1996-05-16 11:47:46 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-05-16 11:47:46 +0000 |
commit | 7560ec91cb3ab69ac43c0b950636e8fb5cd679a8 (patch) | |
tree | ad4bc78c2672e660c67bf48d392df7569092418a /usr.sbin/sysinstall/index.c | |
parent | 996907c1963a00f3889ca45db47ef7ec7d08c25c (diff) | |
download | FreeBSD-src-7560ec91cb3ab69ac43c0b950636e8fb5cd679a8.zip FreeBSD-src-7560ec91cb3ab69ac43c0b950636e8fb5cd679a8.tar.gz |
Fix some long-standing malloc bugs in the package handling code (freeing garbage
in one place, leaking memory in another).
Add a facility to invoke subsystems directly by naming them on
sysinstall's command-line when running post-install. A replacement
for pkg_manage might, for example, be `/stand/sysinstall configPackages'
Fix bogon where upgrade shell was entered with tty modes spammed.
Fix bug with release name checking in ftp_strat. Turned a bunch of
bogus exit()s into proper calls to systemShutdown().
Diffstat (limited to 'usr.sbin/sysinstall/index.c')
-rw-r--r-- | usr.sbin/sysinstall/index.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/sysinstall/index.c b/usr.sbin/sysinstall/index.c index b494581..2ca5a1b 100644 --- a/usr.sbin/sysinstall/index.c +++ b/usr.sbin/sysinstall/index.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: index.c,v 1.27 1996/04/30 21:22:29 jkh Exp $ + * $Id: index.c,v 1.28 1996/05/01 09:31:50 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -331,12 +331,16 @@ index_sort(PkgNodePtr top) } } -/* Delete an entry out of the index */ +/* Delete an entry out of the list it's in (only the plist, at present) */ void index_delete(PkgNodePtr n) { - if (n->next) + if (n->next) { + PkgNodePtr p = n->next; + *n = *(n->next); + safe_free(p); + } else /* Kludgy end sentinal */ n->name = NULL; } |