aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2010-05-09 17:46:42 +0000
committerMartin Storsjö <martin@martin.st>2010-05-09 17:46:42 +0000
commit6ad533b7cbee7412b80a17531bff2739b8e34109 (patch)
tree8970c8ece4843c0174ec10e6e8ab8835e8e4b080
parent17be16a3364a02c2a232b523442fcc136f7dfaba (diff)
downloadffmpeg-6ad533b7cbee7412b80a17531bff2739b8e34109.tar.gz
qt-faststart: Avoid leaking memory if encountering a file with double ftyp atoms
Originally committed as revision 23065 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--tools/qt-faststart.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/qt-faststart.c b/tools/qt-faststart.c
index bcd5e478a6..f48ffc0b5d 100644
--- a/tools/qt-faststart.c
+++ b/tools/qt-faststart.c
@@ -116,6 +116,7 @@ int main(int argc, char *argv[])
/* keep ftyp atom */
if (atom_type == FTYP_ATOM) {
ftyp_atom_size = atom_size;
+ free(ftyp_atom);
ftyp_atom = malloc(ftyp_atom_size);
if (!ftyp_atom) {
printf ("could not allocate %"PRIu64" byte for ftyp atom\n",