Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12bb12fa authored by Alexander Beregalov's avatar Alexander Beregalov Committed by Greg Kroah-Hartman
Browse files

staging: hv: fix memory leaks



Free resources before exit.

Signed-off-by: default avatarAlexander 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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent dd9b15dc
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
	}