[x264-devel] [PATCH] free the handle after file close

Limin Wang lance.lmwang at gmail.com
Mon Mar 5 15:14:23 CET 2007


Hi,

The patch try to free the handle context after file closed. Please review it.


Thanks,
Limin 
-------------- next part --------------
Index: muxers.c
===================================================================
--- muxers.c	(revision 627)
+++ muxers.c	(working copy)
@@ -106,7 +106,9 @@
     yuv_input_t *h = handle;
     if( !h || !h->fh )
         return 0;
-    return fclose(h->fh);
+    fclose(h->fh);
+    free(h);
+    return 0;
 }
 
 /* YUV4MPEG2 raw 420 yuv file operation */
@@ -307,7 +309,9 @@
     y4m_input_t *h = handle;
     if( !h || !h->fh )
         return 0;
-    return fclose(h->fh);
+    fclose(h->fh);
+    free(h);
+    return 0;
 }
 
 /* avs/avi input file support under cygwin */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: not available
Url : http://mailman.videolan.org/pipermail/x264-devel/attachments/20070305/65bdb375/attachment.pgp 


More information about the x264-devel mailing list