aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorKirill Ponomarev <krion@FreeBSD.org>2007-11-10 22:57:12 +0000
committerKirill Ponomarev <krion@FreeBSD.org>2007-11-10 22:57:12 +0000
commitdffc4d533f145e49bbd98a475b5ad98d133b2c01 (patch)
tree5fc2441329a1895e325934b5c66c3ca9ff543c7e /usr.sbin
parentdd85d6d3455fe24ffe44c9b494717f82e69af607 (diff)
downloadsrc-dffc4d533f145e49bbd98a475b5ad98d133b2c01.tar.gz
src-dffc4d533f145e49bbd98a475b5ad98d133b2c01.zip
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
Notes
Notes: svn path=/head/; revision=173533
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_install/delete/perform.c2
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 1e40db6d2f6a..1da3ad70e0ad 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);