aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/tiff.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-03-09 14:31:07 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-03-12 14:37:45 +0100
commitf6f94c335765b379aaaa4ee0de10c20b8632746f (patch)
tree1cad95c594029c6cb91417f6a7323897ae190a4a /libavcodec/tiff.c
parent957053b52a2dae4e80df95ec70be1a8a7f2b2365 (diff)
downloadffmpeg-f6f94c335765b379aaaa4ee0de10c20b8632746f.tar.gz
avcodec/tiff: Don't check before av_freep()
Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/tiff.c')
-rw-r--r--libavcodec/tiff.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index c45fd34dbc..6a0f8ee1e7 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;
}