[FFmpeg-cvslog] r23065 - trunk/tools/qt-faststart.c

mstorsjo subversion
Sun May 9 19:46:42 CEST 2010


Author: mstorsjo
Date: Sun May  9 19:46:42 2010
New Revision: 23065

Log:
qt-faststart: Avoid leaking memory if encountering a file with double ftyp atoms

Modified:
   trunk/tools/qt-faststart.c

Modified: trunk/tools/qt-faststart.c
==============================================================================
--- trunk/tools/qt-faststart.c	Sun May  9 19:05:35 2010	(r23064)
+++ trunk/tools/qt-faststart.c	Sun May  9 19:46:42 2010	(r23065)
@@ -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",



More information about the ffmpeg-cvslog mailing list