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

Fixes CIDs #1427821 and #1427822.
This commit is contained in:
Mark Thompson 2018-01-21 22:59:29 +00:00
parent 9bba10c174
commit bda5ad305e
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}