2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-20 03:04:01 +08:00

staging: unisys: visorbus: Fix memory leak

The name of a visor_device was never freed, which was allocated in
visorbus_configure.

It is expected that visorbus_device_destroy will not be called on the
same visor_device again, or this would be a double free.

Signed-off-by: Zachary Dremann <dremann@gmail.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Zachary Dremann 2017-07-17 16:17:03 -04:00 committed by Greg Kroah-Hartman
parent 403043c4e1
commit 661a215bc3

View File

@ -933,6 +933,7 @@ visorbus_device_destroy(struct controlvm_message *inmsg)
dev_info->pending_msg_hdr = pmsg_hdr;
}
kfree(dev_info->name);
visorchipset_device_destroy(dev_info);
return 0;