diff options
author | 2015-12-22 19:46:16 +0000 | |
---|---|---|
committer | 2015-12-22 19:46:16 +0000 | |
commit | 150994d23e6cf572063433dc9d9fa2169096d18b (patch) | |
tree | 87f0c6c2bb8e95992d0ee959fcc36d3769b0ab99 | |
parent | remove a NULL-check before free() (diff) | |
download | wireguard-openbsd-150994d23e6cf572063433dc9d9fa2169096d18b.tar.xz wireguard-openbsd-150994d23e6cf572063433dc9d9fa2169096d18b.zip |
remove a NULL-check before free()
-rw-r--r-- | usr.bin/usbhidctl/usbhid.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/usbhidctl/usbhid.c b/usr.bin/usbhidctl/usbhid.c index b8643ebe7bf..034b806c19a 100644 --- a/usr.bin/usbhidctl/usbhid.c +++ b/usr.bin/usbhidctl/usbhid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usbhid.c,v 1.11 2013/11/27 00:13:23 deraadt Exp $ */ +/* $OpenBSD: usbhid.c,v 1.12 2015/12/22 19:46:16 mmcc Exp $ */ /* $NetBSD: usbhid.c,v 1.22 2002/02/20 20:30:42 christos Exp $ */ /* @@ -412,8 +412,7 @@ allocreport(struct Sreport *report, report_desc_t rd, int repindex) static void freereport(struct Sreport *report) { - if (report->buffer != NULL) - free(report->buffer); + free(report->buffer); report->status = srs_uninit; } |