[FFmpeg-cvslog] v4l2_m2m: Fix free of the wrong pointer in an error path

Mark Thompson git at videolan.org
Mon Jan 22 01:06:41 EET 2018


ffmpeg | branch: master | Mark Thompson <sw at jkqxz.net> | Sun Jan 21 22:59:29 2018 +0000| [bda5ad305e907d6e5eaa6abbb1b3bc1590ec20d8] | committer: Mark Thompson

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

Fixes CIDs #1427821 and #1427822.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bda5ad305e907d6e5eaa6abbb1b3bc1590ec20d8
---

 libavcodec/v4l2_m2m.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/v4l2_m2m.c b/libavcodec/v4l2_m2m.c
index fd989ce601..427e165f58 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);
     }
 



More information about the ffmpeg-cvslog mailing list