summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2010-05-19 13:51:54 +0000
committerReinhard Tartler <siretart@tauware.de>2010-05-19 13:51:54 +0000
commit369e37e9002e8aa765429ba6e969dda69c8f06fb (patch)
tree84f33f8ac9625e6612a4dff5c756b9b9b3851481 /tools
parent40630a90ed95018a2b2e5c740f2510a29a226f0f (diff)
qt-faststart: Avoid leaking memory if encountering a file with double ftyp atoms
backport r23065 by mstorsjo Originally committed as revision 23190 to svn://svn.ffmpeg.org/ffmpeg/branches/0.6
Diffstat (limited to 'tools')
-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",