diff options
author | Zachary Dremann | 2017-07-17 22:17:03 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2017-07-18 08:48:42 +0200 |
commit | 661a215bc3a8decfe0defd2637bb3a13aba36d49 (patch) | |
tree | 3358c3ca42b09b38d934e3f4c2bfa1b0f59b6336 /drivers/staging/unisys/visorbus/visorchipset.c | |
parent | staging: unisys: moved visor_check_channel from include/channel.h to visorbus... (diff) | |
download | kernel-qcow2-linux-661a215bc3a8decfe0defd2637bb3a13aba36d49.tar.gz kernel-qcow2-linux-661a215bc3a8decfe0defd2637bb3a13aba36d49.tar.xz kernel-qcow2-linux-661a215bc3a8decfe0defd2637bb3a13aba36d49.zip |
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>
Diffstat (limited to 'drivers/staging/unisys/visorbus/visorchipset.c')
-rw-r--r-- | drivers/staging/unisys/visorbus/visorchipset.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |