Commit 661a215b authored by Zachary Dremann's avatar Zachary Dremann Committed by Greg Kroah-Hartman
Browse files

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: default avatarZachary Dremann <dremann@gmail.com>
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Reviewed-by: default avatarDavid Binder <david.binder@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 403043c4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;