diff mbox

[FFmpeg-devel,v1,1/2] libavformat/avio: Fix for the unexpected file close which will cause fd 0 is closed

Message ID 20190618104513.19549-1-lance.lmwang@gmail.com
State Superseded
Headers show

Commit Message

Lance Wang June 18, 2019, 10:45 a.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavformat/avio.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Michael Niedermayer July 12, 2019, 8:47 p.m. UTC | #1
On Tue, Jun 18, 2019 at 06:45:12PM +0800, lance.lmwang@gmail.com wrote:
> From: Limin Wang <lance.lmwang@gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> ---
>  libavformat/avio.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/libavformat/avio.c b/libavformat/avio.c
> index 663789ec02..c1d10ee8c3 100644
> --- a/libavformat/avio.c
> +++ b/libavformat/avio.c
> @@ -568,7 +568,6 @@ int avio_open_dir(AVIODirContext **s, const char *url, AVDictionary **options)
>    fail:
>      av_free(ctx);
>      *s = NULL;
> -    ffurl_close(h);
>      return ret;
>  }
>  
> @@ -594,7 +593,6 @@ int avio_close_dir(AVIODirContext **s)
>          return AVERROR(EINVAL);
>      h = (*s)->url_context;
>      h->prot->url_close_dir(h);
> -    ffurl_close(h);
>      av_freep(s);
>      *s = NULL;
>      return 0;

have you checked this for memleaks ?

thanks

[...]
diff mbox

Patch

diff --git a/libavformat/avio.c b/libavformat/avio.c
index 663789ec02..c1d10ee8c3 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -568,7 +568,6 @@  int avio_open_dir(AVIODirContext **s, const char *url, AVDictionary **options)
   fail:
     av_free(ctx);
     *s = NULL;
-    ffurl_close(h);
     return ret;
 }
 
@@ -594,7 +593,6 @@  int avio_close_dir(AVIODirContext **s)
         return AVERROR(EINVAL);
     h = (*s)->url_context;
     h->prot->url_close_dir(h);
-    ffurl_close(h);
     av_freep(s);
     *s = NULL;
     return 0;