]> git.sesse.net Git - ffmpeg/commitdiff
v4l2_m2m: Fix free of the wrong pointer in an error path
authorMark Thompson <sw@jkqxz.net>
Sun, 21 Jan 2018 22:59:29 +0000 (22:59 +0000)
committerMark Thompson <sw@jkqxz.net>
Sun, 21 Jan 2018 23:02:16 +0000 (23:02 +0000)
Fixes CIDs #1427821 and #1427822.

libavcodec/v4l2_m2m.c

index fd989ce60156b813cbc9d7ccdbb573d15352ac40..427e165f586f940f14fdef16dc411364580cc1b8 100644 (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);
     }