avcodec/h264_metadata_bsf: Fix invalid av_freep
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 4 Jul 2020 18:57:56 +0000 (20:57 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 4 Jul 2020 19:46:30 +0000 (21:46 +0200)
This bug was introduced in 3c8a2a1180f03ca6b299ebc27eef21ae86635ca0.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/h264_metadata_bsf.c

index 9901765..cef054b 100644 (file)
@@ -528,7 +528,7 @@ static int h264_metadata_filter(AVBSFContext *bsf, AVPacket *pkt)
                 if (err < 0) {
                     av_log(bsf, AV_LOG_ERROR, "Failed to attach extracted "
                            "displaymatrix side data to packet.\n");
                 if (err < 0) {
                     av_log(bsf, AV_LOG_ERROR, "Failed to attach extracted "
                            "displaymatrix side data to packet.\n");
-                    av_freep(matrix);
+                    av_free(matrix);
                     goto fail;
                 }
             }
                     goto fail;
                 }
             }