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>
if (ret != 0) {
pr_err("unable to open channel: %d", ret);
+ FreeInputDevice(inputDevice);
return -1;
}
pr_err("unable to connect channel: %d", ret);
vmbus_close(Device->channel);
+ FreeInputDevice(inputDevice);
return ret;
}