]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
urtwn: fix memory leak on device restart
authorAndriy Voskoboinyk <avos@FreeBSD.org>
Fri, 24 Jun 2016 23:36:22 +0000 (23:36 +0000)
committerAndriy Voskoboinyk <avos@FreeBSD.org>
Fri, 24 Jun 2016 23:36:22 +0000 (23:36 +0000)
commit532a0e9ca022bf20367b26e2a3bb0a07c15c01ad
treea580c87e2c423f4debc5e39fc91667df02d9fbfe
parentfaebc97a1cb4f0a36a39f0ba9c1b266e070c5f4f
urtwn: fix memory leak on device restart

Free data buffers every time when device is stopped, not when
it is detached; they are allocated at the initialization stage.

How-to-reproduce:
1) ifconfig wlan0 create wlandev urtwn0 up
2) vmstat -m | grep USBdev
3) service netif restart
4) vmstat -m | grep USBdev

Also, remove usbd_transfer_drain() call; it is already called by
usbd_transfer_unsetup().

Tested with RTL8188CUS, STA mode.

Approved by: re (marius)
sys/dev/urtwn/if_urtwn.c