diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2017-06-21 12:37:25 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2017-06-21 12:37:25 +0000 |
commit | 5b2bfa3464754cb42cb8c3c3a2e6380577a04cba (patch) | |
tree | e91c62007d2fefadd5ce84ef0dbf0051a1cdbc8d /sbin | |
parent | ef5ea27e4d29f3536176a119dc4a481a1ae51332 (diff) |
Allow familiar idiom free_client_lease(NULL).
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/dhclient/dhclient.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 1715dd347ca..440d87a4762 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.439 2017/06/19 19:28:35 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.440 2017/06/21 12:37:24 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -1742,7 +1742,7 @@ free_client_lease(struct client_lease *lease) int i; /* Static leases are forever. */ - if (lease->is_static) + if (lease == NULL || lease->is_static) return; free(lease->server_name); |