This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 6489456452 avcodec/itut35: free HDR metadata on failure
6489456452 is described below

commit 648945645255553cdcaa8b778baa02850c7c8ea1
Author:     Zhao Zhili <[email protected]>
AuthorDate: Mon Jun 15 16:51:52 2026 +0800
Commit:     James Almer <[email protected]>
CommitDate: Mon Jun 15 15:35:07 2026 +0000

    avcodec/itut35: free HDR metadata on failure
---
 libavcodec/itut35.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/libavcodec/itut35.c b/libavcodec/itut35.c
index a7ee5e2977..8debf89ab3 100644
--- a/libavcodec/itut35.c
+++ b/libavcodec/itut35.c
@@ -204,8 +204,10 @@ int ff_itut_t35_parse_payload_to_struct(FFITUTT35 *const 
itut_t35, FFITUTT35Aux
 
             ret = av_dynamic_hdr_plus_from_t35(hdr_plus, itut_t35->payload,
                                                itut_t35->payload_size);
-            if (ret < 0)
+            if (ret < 0) {
+                av_free(hdr_plus);
                 return ret;
+            }
 
             av_buffer_unref(&metadata->hdr_plus);
             metadata->hdr_plus = av_buffer_create((uint8_t *)hdr_plus, size, 
NULL, NULL, 0);
@@ -248,8 +250,10 @@ int ff_itut_t35_parse_payload_to_struct(FFITUTT35 *const 
itut_t35, FFITUTT35Aux
 
             ret = av_dynamic_hdr_smpte2094_app5_from_t35(hdr_smpte2094_app5, 
itut_t35->payload,
                                                          
itut_t35->payload_size);
-            if (ret < 0)
+            if (ret < 0) {
+                av_free(hdr_smpte2094_app5);
                 return ret;
+            }
 
             av_buffer_unref(&metadata->hdr_smpte2094_app5);
             metadata->hdr_smpte2094_app5 = av_buffer_create((uint8_t 
*)hdr_smpte2094_app5, size, NULL, NULL, 0);

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to