]> git.sesse.net Git - x264/commitdiff
dump_yuv: Fix file handle leak
authorAnton Mitrofanov <BugMaster@narod.ru>
Fri, 24 Jul 2015 21:21:52 +0000 (00:21 +0300)
committerAnton Mitrofanov <BugMaster@narod.ru>
Fri, 24 Jul 2015 21:43:53 +0000 (00:43 +0300)
encoder/encoder.c

index 9323b38a2906a82edb951123265e1cf8596c7a85..9d25a77eb754788296cb9aa74b9679e480173b42 100644 (file)
@@ -1701,6 +1701,7 @@ x264_t *x264_encoder_open( x264_param_t *param )
         else if( !x264_is_regular_file( f ) )
         {
             x264_log( h, X264_LOG_ERROR, "dump_yuv: incompatible with non-regular file %s\n", h->param.psz_dump_yuv );
+            fclose( f );
             goto fail;
         }
         fclose( f );