Skip to content
Commit 1fd6eb12 authored by 蒋家盛's avatar 蒋家盛 Committed by Hans Verkuil
Browse files

media: vidtv: mux: Add check and kfree for kstrdup



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: c2f78f0c ("media: vidtv: psi: add a Network Information Table (NIT)")
Signed-off-by: default avatarJiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 76a2c5df
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment