From 1d034e4bd5bfd6d1c871d1dde0e6a82dc6fbb887 Mon Sep 17 00:00:00 2001 From: krw Date: Wed, 21 Jun 2017 12:37:24 +0000 Subject: [PATCH] Allow familiar idiom free_client_lease(NULL). --- sbin/dhclient/dhclient.c | 4 ++-- 1 file 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 @@ -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); -- 2.20.1