Drivers: hv: vmbus: Don't leak memory when a channel is rescinded
authorK. Y. Srinivasan <kys@microsoft.com>
Mon, 13 Mar 2017 03:00:30 +0000 (20:00 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Mar 2017 07:41:27 +0000 (09:41 +0200)
commitdf1fe6c9ad481f6ca1b125a081376744c97d3910
tree22e14c4304deec87aa3b8cb9621beae1228b70a7
parentb1f6b0a5a066196e0bf1d504a7afaef4643a13ad
Drivers: hv: vmbus: Don't leak memory when a channel is rescinded

commit 5e030d5ce9d99a899b648413139ff65bab12b038 upstream.

When we close a channel that has been rescinded, we will leak memory since
vmbus_teardown_gpadl() returns an error. Fix this so that we can properly
cleanup the memory allocated to the ring buffers.

Fixes: ccb61f8a99e6 ("Drivers: hv: vmbus: Fix a rescind handling bug")

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/channel.c