avformat/avio: Fix null pointer dereference in case of memleak
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
7bacf74536
commit
936751b652
@ -270,6 +270,8 @@ static const struct URLProtocol *url_find_protocol(const char *filename)
|
|||||||
*ptr = '\0';
|
*ptr = '\0';
|
||||||
|
|
||||||
protocols = ffurl_get_protocols(NULL, NULL);
|
protocols = ffurl_get_protocols(NULL, NULL);
|
||||||
|
if (!protocols)
|
||||||
|
return NULL;
|
||||||
for (i = 0; protocols[i]; i++) {
|
for (i = 0; protocols[i]; i++) {
|
||||||
const URLProtocol *up = protocols[i];
|
const URLProtocol *up = protocols[i];
|
||||||
if (!strcmp(proto_str, up->name)) {
|
if (!strcmp(proto_str, up->name)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user