diff options
author | krion <krion@FreeBSD.org> | 2007-11-10 22:57:12 +0000 |
---|---|---|
committer | krion <krion@FreeBSD.org> | 2007-11-10 22:57:12 +0000 |
commit | 10e9042adf470ef6aa9ff73f8e0fa5a48d2139b3 (patch) | |
tree | 5fc2441329a1895e325934b5c66c3ca9ff543c7e /usr.sbin | |
parent | 38ba9268aa592852827c0fadf3a8a30b5b30734d (diff) | |
download | FreeBSD-src-10e9042adf470ef6aa9ff73f8e0fa5a48d2139b3.zip FreeBSD-src-10e9042adf470ef6aa9ff73f8e0fa5a48d2139b3.tar.gz |
Fix segfault while running with -a option and deinstalling broken
packages with incorrect plists.
PR: bin/115327
Submitted by: Michael Zhilin <mizhka@gmail.com>
MFC after: 3 days
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_install/delete/perform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/pkg_install/delete/perform.c b/usr.sbin/pkg_install/delete/perform.c index 1e40db6..1da3ad7 100644 --- a/usr.sbin/pkg_install/delete/perform.c +++ b/usr.sbin/pkg_install/delete/perform.c @@ -266,7 +266,7 @@ pkg_do(char *pkg) for (p = Plist.head; p ; p = p->next) { if (p->type != PLIST_PKGDEP) continue; - deporigin = (p->next->type == PLIST_DEPORIGIN) ? p->next->name : + deporigin = (p->next != NULL && p->next->type == PLIST_DEPORIGIN) ? p->next->name : NULL; if (Verbose) { printf("Trying to remove dependency on package '%s'", p->name); |