vpxenc: free resources
authorJames Zern <jzern@google.com>
Tue, 28 Jun 2011 19:10:24 +0000 (12:10 -0700)
committerJames Zern <jzern@google.com>
Tue, 28 Jun 2011 19:10:24 +0000 (12:10 -0700)
Free buffers allocated for y4m input and webm cue list.

Change-Id: I02051baae3b45f692cf5c7f520ea9a2d80c7b470

vpxenc.c

index d311a14..26afcd6 100644 (file)
--- a/vpxenc.c
+++ b/vpxenc.c
@@ -2040,10 +2040,14 @@ int main(int argc, const char **argv_)
         vpx_codec_destroy(&encoder);
 
         fclose(infile);
+        if (file_type == FILE_TYPE_Y4M)
+            y4m_input_close(&y4m);
 
         if(write_webm)
         {
             write_webm_file_footer(&ebml, hash);
+            free(ebml.cue_list);
+            ebml.cue_list = NULL;
         }
         else
         {