From bda5ad305e907d6e5eaa6abbb1b3bc1590ec20d8 Mon Sep 17 00:00:00 2001 From: Mark Thompson Date: Sun, 21 Jan 2018 22:59:29 +0000 Subject: v4l2_m2m: Fix free of the wrong pointer in an error path Fixes CIDs #1427821 and #1427822. --- libavcodec/v4l2_m2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/v4l2_m2m.c') diff --git a/libavcodec/v4l2_m2m.c b/libavcodec/v4l2_m2m.c index fd989ce..427e165 100644 --- a/libavcodec/v4l2_m2m.c +++ b/libavcodec/v4l2_m2m.c @@ -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); } -- cgit v1.1