diff mbox series

[FFmpeg-devel,3/6] avcodec/tiff: Don't check before av_freep()

Message ID AS8P250MB0744AFF71A19E084DBF4C1568F252@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit f6f94c335765b379aaaa4ee0de10c20b8632746f
Headers show
Series [FFmpeg-devel,1/6] avcodec/tiff: Fix handling of av_strdup() failures | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt March 10, 2024, 2:15 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/tiff.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index afa1289e27..5d350f4e7e 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -132,11 +132,8 @@  static void tiff_set_type(TiffContext *s, enum TiffType tiff_type) {
 
 static void free_geotags(TiffContext *const s)
 {
-    int i;
-    for (i = 0; i < s->geotag_count; i++) {
-        if (s->geotags[i].val)
-            av_freep(&s->geotags[i].val);
-    }
+    for (int i = 0; i < s->geotag_count; i++)
+        av_freep(&s->geotags[i].val);
     av_freep(&s->geotags);
     s->geotag_count = 0;
 }