Skip to content
Commit 23bc5eb5 authored by Dongliang Mu's avatar Dongliang Mu Committed by Mauro Carvalho Chehab
Browse files

media: airspy: fix memory leak in airspy probe



The commit ca9dc8d0 ("media: airspy: respect the DMA coherency
 rules") moves variable buf from stack to heap, however, it only frees
buf in the error handling code, missing deallocation in the success
path.

Fix this by freeing buf in the success path since this variable does not
have any references in other code.

Fixes: ca9dc8d0 ("media: airspy: respect the DMA coherency rules")
Reported-by: default avatar <syzbot+bb25f85e5aa482864dc0@syzkaller.appspotmail.com>
Signed-off-by: default avatarDongliang Mu <mudongliangabcd@gmail.com>
Reviewed-by: default avatarTommaso Merciai <tommaso.merciai@amarulasolution.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent d682869d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment