]> git.tuebingen.mpg.de Git - paraslash.git/commit
mp4: Fix possible memory leak on errors.
authorAndre Noll <maan@tuebingen.mpg.de>
Fri, 27 Aug 2021 17:20:42 +0000 (19:20 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 27 Jun 2022 14:45:56 +0000 (16:45 +0200)
commit89a86169a6b96ccd3829c5600b667ec40bb56e47
treebe408fe71fd5d2736b02700cc1a6a5054d70431f
parentc2e987abfcf711c85e00fc11b9ef00d38ad89f3a
mp4: Fix possible memory leak on errors.

If the sanity checks in open_file() fail, we free the mp4 structure
but not the various tables and metadata items we might already have
allocated at this point.

Fix this by calling mp4_close() instead of freeing the mp4 struct
directly. We have to move mp4_close() above open_file() to avoid a
forward declaration.
mp4.c