From 661a215bc3a8decfe0defd2637bb3a13aba36d49 Mon Sep 17 00:00:00 2001 From: Zachary Dremann Date: Mon, 17 Jul 2017 16:17:03 -0400 Subject: [PATCH] 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 Signed-off-by: David Kershner Reviewed-by: David Binder Signed-off-by: Greg Kroah-Hartman --- drivers/staging/unisys/visorbus/visorchipset.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index 160a63ef70e4..aa6ee41b2828 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -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; -- 2.20.1