summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2017-12-04 14:56:08 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2017-12-04 14:56:08 +0000
commit3d1259a8192307bf11bed0d3ad3cd984f5163279 (patch)
tree2c858e3968df87e2588519865ec84561e1a91c97 /sbin
parent44cb38bb4e49addf895c5193bbda9cefb58ff660 (diff)
Avoid a NULL-deref in get_recorded_lease() leading to a segfault seen
by aja and others. ok krw
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dhclient/dhclient.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index 1a41f97ac9f..664ea2bab73 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.532 2017/12/03 20:53:28 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.533 2017/12/04 14:56:07 tb Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -2541,7 +2541,7 @@ get_recorded_lease(struct interface_info *ifi)
break;
}
- if (lp->epoch == 0)
+ if (lp && lp->epoch == 0)
time(&lp->epoch);
return lp;