aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Beregalov <[email protected]>2011-03-13 21:58:49 +0300
committerGreg Kroah-Hartman <[email protected]>2011-03-14 12:38:15 -0700
commit12bb12fac06d6212be9a5ed282c5670d4e90747f (patch)
treeca0e51747d424fd4bf85a2512f494305673b2eb4
parentdd9b15dc03075993f63a8a69667a3a8989aedfa1 (diff)
staging: hv: fix memory leaks
Free resources before exit. Signed-off-by: Alexander Beregalov <[email protected]> Cc: K. Y. Srinivasan <[email protected]> Cc: Haiyang Zhang <[email protected]> Cc: Mike Sterling <[email protected]> Cc: Abhishek Kane <[email protected]> Cc: Hank Janssen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/hv/hv_mouse.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
index 6fa462109ce9..50147f84741c 100644
--- a/drivers/staging/hv/hv_mouse.c
+++ b/drivers/staging/hv/hv_mouse.c
@@ -684,6 +684,7 @@ static int MousevscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo)
if (ret != 0) {
pr_err("unable to open channel: %d", ret);
+ FreeInputDevice(inputDevice);
return -1;
}
@@ -695,6 +696,7 @@ static int MousevscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo)
pr_err("unable to connect channel: %d", ret);
vmbus_close(Device->channel);
+ FreeInputDevice(inputDevice);
return ret;
}