summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEkansh Gupta <quic_ekangupt@quicinc.com>2024-06-28 14:44:59 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-07-03 17:17:53 +0300
commitad0bd973a033003ca578c42a760d1dc77aeea15e (patch)
tree9acfbb786564e490fd6fa184ad45d75bd543cc6e
parentbfb6b07d2a30ffe98864d8cfc31fc00470063025 (diff)
downloadlinux-ad0bd973a033003ca578c42a760d1dc77aeea15e.tar.xz
misc: fastrpc: Fix memory leak in audio daemon attach operation
Audio PD daemon send the name as part of the init IOCTL call. This name needs to be copied to kernel for which memory is allocated. This memory is never freed which might result in memory leak. Free the memory when it is not needed. Fixes: 0871561055e6 ("misc: fastrpc: Add support for audiopd") Cc: stable <stable@kernel.org> Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20240628114501.14310-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/misc/fastrpc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
index 3fef3eecb88c..11d53b9322f1 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -1320,6 +1320,7 @@ static int fastrpc_init_create_static_process(struct fastrpc_user *fl,
goto err_invoke;
kfree(args);
+ kfree(name);
return 0;
err_invoke: