From: krw Date: Wed, 21 Jun 2017 12:37:24 +0000 (+0000) Subject: Allow familiar idiom free_client_lease(NULL). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1d034e4bd5bfd6d1c871d1dde0e6a82dc6fbb887;p=openbsd Allow familiar idiom free_client_lease(NULL). --- 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 @@ -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);