net/vhost: stop dev in close and address mem leak
authorSagar Abhang <sabhang@brocade.com>
Fri, 7 Apr 2017 00:26:37 +0000 (17:26 -0700)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Wed, 19 Apr 2017 08:49:06 +0000 (10:49 +0200)
commit912be9daf41c0a5d1042ccde5581492a43865f32
tree97b7fb08ffc23ee10e154a8d4ea97e5a6e7c5cf6
parent518208f3a1d370dc0873bf08d407a9aa9add4aec
net/vhost: stop dev in close and address mem leak

Move the call to stop the device inside the close routine because close
needs to stop the device if it isn't stopped.

Free the allocated queue buffers in close instead of doing so in remove.
Original code had these clean ups in remove which was causing memory
leak.

Signed-off-by: Sagar Abhang <sabhang@brocade.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
drivers/net/vhost/rte_eth_vhost.c