avformat/avio: Use ffurl_closep
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 29 Nov 2019 09:42:48 +0000 (10:42 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 29 Nov 2019 18:58:35 +0000 (19:58 +0100)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/avio.c

index c1bad31..2dd2312 100644 (file)
@@ -346,8 +346,7 @@ int ffurl_open_whitelist(URLContext **puc, const char *filename, int flags,
     if (!ret)
         return 0;
 fail:
-    ffurl_close(*puc);
-    *puc = NULL;
+    ffurl_closep(puc);
     return ret;
 }