]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/avio.c
Merge commit 'd68fb1475856cf93199e2bc4eee3063902c35df7'
[ffmpeg] / libavformat / avio.c
index 65075932ae26d630c9873a95c7d88760ecd239bd..3606eb0fda965a740d6cc0a8c90d3227b01e9f01 100644 (file)
@@ -270,6 +270,8 @@ static const struct URLProtocol *url_find_protocol(const char *filename)
         *ptr = '\0';
 
     protocols = ffurl_get_protocols(NULL, NULL);
+    if (!protocols)
+        return NULL;
     for (i = 0; protocols[i]; i++) {
             const URLProtocol *up = protocols[i];
         if (!strcmp(proto_str, up->name)) {
@@ -282,6 +284,7 @@ static const struct URLProtocol *url_find_protocol(const char *filename)
             return up;
         }
     }
+    av_freep(&protocols);
 
     return NULL;
 }