summaryrefslogtreecommitdiff
path: root/sbin/dhclient
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2020-04-09 16:08:19 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2020-04-09 16:08:19 +0000
commit209ed3a3e40ddea76df9ea0197ac933670446630 (patch)
tree639d34bb274c2e8ae09b7f5004a4b2396c7d8970 /sbin/dhclient
parent0255bab3b7e5bff6c1dc95d5fc63ffc07383403f (diff)
No need to check for NULL before free().
From Geoff Hill.
Diffstat (limited to 'sbin/dhclient')
-rw-r--r--sbin/dhclient/dhclient.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index 733e33f43de..7de2a135f9b 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.659 2020/01/26 10:31:03 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.660 2020/04/09 16:08:18 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -2315,8 +2315,7 @@ fork_privchld(struct interface_info *ifi, int fd, int fd2)
go_daemon();
- if (log_procname != NULL)
- free(log_procname);
+ free(log_procname);
rslt = asprintf(&log_procname, "%s [priv]", ifi->name);
if (rslt == -1)
fatal("log_procname");