avcodec/tiff: Don't check before av_freep()

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2024-03-09 14:31:07 +01:00
parent 957053b52a
commit f6f94c3357
1 changed files with 2 additions and 5 deletions

View File

@ -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;
}