diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2011-03-13 14:58:49 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-14 15:38:15 -0400 |
commit | 12bb12fac06d6212be9a5ed282c5670d4e90747f (patch) | |
tree | ca0e51747d424fd4bf85a2512f494305673b2eb4 | |
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>
-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) | |||
684 | 684 | ||
685 | if (ret != 0) { | 685 | if (ret != 0) { |
686 | pr_err("unable to open channel: %d", ret); | 686 | pr_err("unable to open channel: %d", ret); |
687 | FreeInputDevice(inputDevice); | ||
687 | return -1; | 688 | return -1; |
688 | } | 689 | } |
689 | 690 | ||
@@ -695,6 +696,7 @@ static int MousevscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo) | |||
695 | pr_err("unable to connect channel: %d", ret); | 696 | pr_err("unable to connect channel: %d", ret); |
696 | 697 | ||
697 | vmbus_close(Device->channel); | 698 | vmbus_close(Device->channel); |
699 | FreeInputDevice(inputDevice); | ||
698 | return ret; | 700 | return ret; |
699 | } | 701 | } |
700 | 702 | ||