mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
media: v4l: fwnode: Make v4l2_fwnode_endpoint_free() safer
Assign vep->link_frequencies to NULL after releasing its memory. Without this change, multiple calls to v4l2_fwnode_endpoint_free() would result in double kfree calls. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
8f4ac27af9
commit
355047f411
1 changed files with 1 additions and 0 deletions
|
@ -512,6 +512,7 @@ void v4l2_fwnode_endpoint_free(struct v4l2_fwnode_endpoint *vep)
|
|||
return;
|
||||
|
||||
kfree(vep->link_frequencies);
|
||||
vep->link_frequencies = NULL;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(v4l2_fwnode_endpoint_free);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue