summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrzalamena <rzalamena@openbsd.org>2016-09-23 13:56:08 +0000
committerrzalamena <rzalamena@openbsd.org>2016-09-23 13:56:08 +0000
commit9edaa06fafc29e3cc659fef63a7ed801a9df057b (patch)
tree87940f00395395ac2414b0406bf8f8e8222098a7
parentSetup checksum offloading instead of relying on the default configuraiton (diff)
downloadwireguard-openbsd-9edaa06fafc29e3cc659fef63a7ed801a9df057b.tar.xz
wireguard-openbsd-9edaa06fafc29e3cc659fef63a7ed801a9df057b.zip
It is ok to call free() on NULL pointers.
ok reyk@
-rw-r--r--usr.sbin/switchd/imsg_util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/switchd/imsg_util.c b/usr.sbin/switchd/imsg_util.c
index 0b034a079ba..4d3a0b4720c 100644
--- a/usr.sbin/switchd/imsg_util.c
+++ b/usr.sbin/switchd/imsg_util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imsg_util.c,v 1.2 2016/08/30 13:39:53 deraadt Exp $ */
+/* $OpenBSD: imsg_util.c,v 1.3 2016/09/23 13:56:08 rzalamena Exp $ */
/*
* Copyright (c) 2010-2016 Reyk Floeter <reyk@openbsd.org>
@@ -118,8 +118,8 @@ ibuf_release(struct ibuf *buf)
{
if (buf == NULL)
return;
- if (buf->buf != NULL)
- free(buf->buf);
+
+ free(buf->buf);
free(buf);
}