diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2011-03-13 21:58:49 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-14 12:38:15 -0700 |
commit | 12bb12fac06d6212be9a5ed282c5670d4e90747f (patch) | |
tree | ca0e51747d424fd4bf85a2512f494305673b2eb4 /drivers/staging | |
parent | dd9b15dc03075993f63a8a69667a3a8989aedfa1 (diff) |
staging: hv: fix memory leaks
Free resources before exit.
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Mike Sterling <mike.sterling@microsoft.com>
Cc: Abhishek Kane <v-abkane@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/hv/hv_mouse.c | 2 |
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; } |