mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-09-28 19:20:30 +00:00
media: vidtv: mux: Add check and kfree for kstrdup
[ Upstream commit1fd6eb1264] Add check for the return value of kstrdup() and return the error if it fails in order to avoid NULL pointer dereference. Moreover, use kfree() in the later error handling in order to avoid memory leak. Fixes:c2f78f0cb2("media: vidtv: psi: add a Network Information Table (NIT)") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
5c26aae372
commit
a254ee1ddc
1 changed files with 6 additions and 1 deletions
Loading…
Add table
Add a link
Reference in a new issue