diff options
author | 2018-05-16 13:14:23 +0000 | |
---|---|---|
committer | 2018-05-16 13:14:23 +0000 | |
commit | aa67b630db6d213541b5a724ea34849032cb4e86 (patch) | |
tree | 0fd553f0927544020b97ffa20ff239287f6daa8e /sys | |
parent | libfuse should not maintain state for FBT_READDIR. If a directory is (diff) | |
download | wireguard-openbsd-aa67b630db6d213541b5a724ea34849032cb4e86.tar.xz wireguard-openbsd-aa67b630db6d213541b5a724ea34849032cb4e86.zip |
Correct order of free(9) in an error case.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/if_bwfm_usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/if_bwfm_usb.c b/sys/dev/usb/if_bwfm_usb.c index 99b1f0122cc..54c990daba0 100644 --- a/sys/dev/usb/if_bwfm_usb.c +++ b/sys/dev/usb/if_bwfm_usb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bwfm_usb.c,v 1.12 2018/05/16 08:20:00 patrick Exp $ */ +/* $OpenBSD: if_bwfm_usb.c,v 1.13 2018/05/16 13:14:23 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2016,2017 Patrick Wildt <patrick@blueri.se> @@ -816,8 +816,8 @@ bwfm_usb_txctl(struct bwfm_softc *bwfm) return 1; } if ((buf = usbd_alloc_buffer(xfer, ctl->len)) == NULL) { - free(ctl, M_TEMP, sizeof(*ctl)); free(ctl->buf, M_TEMP, ctl->len); + free(ctl, M_TEMP, sizeof(*ctl)); usbd_free_xfer(xfer); return 1; } |