Skip to content
Commit e77b259f authored by Wang Hai's avatar Wang Hai Committed by Greg Kroah-Hartman
Browse files

staging: greybus: audio: Fix possible leak free widgets in gbaudio_dapm_free_controls



In gbaudio_dapm_free_controls(), if one of the widgets is not found, an error
will be returned directly, which will cause the rest to be unable to be freed,
resulting in leak.

This patch fixes the bug. If if one of them is not found, just skip and free the others.

Fixes: 510e340e ("staging: greybus: audio: Add helper APIs for dynamic audio module")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Reviewed-by: default avatarVaibhav Agarwal <vaibhav.sr@gmail.com>
Signed-off-by: default avatarWang Hai <wanghai38@huawei.com>
Link: https://lore.kernel.org/r/20201205103827.31244-1-wanghai38@huawei.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 94168e2b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment