mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-01 06:42:31 +00:00
[media] vb2: don't free alloc context if it is ERR_PTR
Don't try to free a pointer containing an ERR_PTR(). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
d935c57e8f
commit
e5ae8fa739
@ -854,7 +854,8 @@ EXPORT_SYMBOL_GPL(vb2_dma_contig_init_ctx);
|
||||
|
||||
void vb2_dma_contig_cleanup_ctx(void *alloc_ctx)
|
||||
{
|
||||
kfree(alloc_ctx);
|
||||
if (!IS_ERR_OR_NULL(alloc_ctx))
|
||||
kfree(alloc_ctx);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(vb2_dma_contig_cleanup_ctx);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user