diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2018-05-16 13:14:24 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2018-05-16 13:14:24 +0000 |
commit | f59a613492f2bc125730772913f7445810009a4d (patch) | |
tree | 1658184e2a1aaaae2fd663e94eff4db150398f48 /sys/dev | |
parent | d910e586dcc4f7a5b90e3119e23cfdc9b286e103 (diff) |
Correct order of free(9) in an error case.
Diffstat (limited to 'sys/dev')
-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; } |