diff options
author | Ding Xiang <[email protected]> | 2019-08-21 10:49:52 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2019-08-28 22:29:01 +0200 |
commit | 961b6ffe0e2c403b09a8efe4a2e986b3c415391a (patch) | |
tree | b268ce2617009ffda9aa815a175c0cfe5d6023e4 | |
parent | c78439f8b97e9719ca3baea4e1a0eef310e4065c (diff) |
stm class: Fix a double free of stm_source_device
In the error path of stm_source_register_device(), the kfree is
unnecessary, as the put_device() before it ends up calling
stm_source_device_release() to free stm_source_device, leading to
a double free at the outer kfree() call. Remove it.
Signed-off-by: Ding Xiang <[email protected]>
Signed-off-by: Alexander Shishkin <[email protected]>
Fixes: 7bd1d4093c2fa ("stm class: Introduce an abstraction for System Trace Module devices")
Link: https://lore.kernel.org/linux-arm-kernel/[email protected]/
Cc: [email protected] # v4.4+
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/hwtracing/stm/core.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c index e55b902560de..181e7ff1ec4f 100644 --- a/drivers/hwtracing/stm/core.c +++ b/drivers/hwtracing/stm/core.c @@ -1276,7 +1276,6 @@ int stm_source_register_device(struct device *parent, err: put_device(&src->dev); - kfree(src); return err; } |