From 2e392450209b7c71598b33a5bb72ecbacc8b526e Mon Sep 17 00:00:00 2001
From: benoit <benoit@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date: Wed, 8 Jul 2009 08:26:57 +0000
Subject: [PATCH] Fix mem leak when user preallocates an AVFormatContext,
 passes it to av_open_input_file(), but the file does not exist. Patch by Art
 Clarke a$(surname) xuggle com

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19370 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
---
 libavformat/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index cd189712c..3fce3fa87 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -499,7 +499,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
     av_freep(&pd->buf);
     if (pb)
         url_fclose(pb);
-    *ic_ptr = NULL;
+    av_freep(ic_ptr);
     return err;
 
 }
-- 
2.25.4