Commit bda5ad30 authored by Mark Thompson's avatar Mark Thompson

v4l2_m2m: Fix free of the wrong pointer in an error path

Fixes CIDs #1427821 and #1427822.
parent 9bba10c1
......@@ -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),
&v4l2_m2m_destroy_context, NULL, 0);
if (!priv->context_ref) {
av_free(s);
av_freep(s);
return AVERROR(ENOMEM);
}
......
Markdown is supported
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