From: Zachary Dremann Date: Mon, 17 Jul 2017 20:17:03 +0000 (-0400) Subject: staging: unisys: visorbus: Fix memory leak X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=661a215bc3a8decfe0defd2637bb3a13aba36d49;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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;