summaryrefslogtreecommitdiff
path: root/usr.sbin/sensorsd/sensorsd.c
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-12-12 20:04:24 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-12-12 20:04:24 +0000
commit4735ccca4462d5820ad08d28cb8cfd5151eb9d9f (patch)
treece0b744455b18d2ed0d71f6328fc63a57aff22f0 /usr.sbin/sensorsd/sensorsd.c
parent921ca576c5940a00b46b54ae0bc24d8d1fae52d7 (diff)
Remove NULL-checks before free().
Diffstat (limited to 'usr.sbin/sensorsd/sensorsd.c')
-rw-r--r--usr.sbin/sensorsd/sensorsd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/sensorsd/sensorsd.c b/usr.sbin/sensorsd/sensorsd.c
index 719df4bca24..8374be81642 100644
--- a/usr.sbin/sensorsd/sensorsd.c
+++ b/usr.sbin/sensorsd/sensorsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sensorsd.c,v 1.58 2015/11/19 06:08:06 deraadt Exp $ */
+/* $OpenBSD: sensorsd.c,v 1.59 2015/12/12 20:04:23 mmcc Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -244,8 +244,7 @@ destroy_sdlim(struct sdlim_t *sdlim)
while ((limit = TAILQ_FIRST(&sdlim->limits)) != NULL) {
TAILQ_REMOVE(&sdlim->limits, limit, entries);
- if (limit->command != NULL)
- free(limit->command);
+ free(limit->command);
free(limit);
}
free(sdlim);