v4l2_m2m: Fix free of the wrong pointer in an error path
Fixes CIDs #1427821 and #1427822.
This commit is contained in:
parent
9bba10c174
commit
bda5ad305e
@ -390,7 +390,7 @@ int ff_v4l2_m2m_create_context(AVCodecContext *avctx, V4L2m2mContext **s)
|
|||||||
priv->context_ref = av_buffer_create((uint8_t *) *s, sizeof(V4L2m2mContext),
|
priv->context_ref = av_buffer_create((uint8_t *) *s, sizeof(V4L2m2mContext),
|
||||||
&v4l2_m2m_destroy_context, NULL, 0);
|
&v4l2_m2m_destroy_context, NULL, 0);
|
||||||
if (!priv->context_ref) {
|
if (!priv->context_ref) {
|
||||||
av_free(s);
|
av_freep(s);
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user