]> granicus.if.org Git - libx264/commitdiff
fix a small memleak.
authorLoren Merritt <pengvado@videolan.org>
Mon, 5 Mar 2007 15:35:42 +0000 (15:35 +0000)
committerLoren Merritt <pengvado@videolan.org>
Mon, 5 Mar 2007 15:35:42 +0000 (15:35 +0000)
patch by Limin Wang.

git-svn-id: svn://svn.videolan.org/x264/trunk@628 df754926-b1dd-0310-bc7b-ec298dee348c

muxers.c

index dc825b6e2877cac905da590e751ed95bedd84313..f9d0b3dbb72b94c430ca8d33b54baf724f4d0ff4 100644 (file)
--- a/muxers.c
+++ b/muxers.c
@@ -106,7 +106,9 @@ int close_file_yuv(hnd_t handle)
     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 @@ int close_file_y4m(hnd_t handle)
     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 */