Commit 89d4d7d7 authored by Michael Niedermayer's avatar Michael Niedermayer

doc/examples/http_multiclient: Fix resource leak

Fixes CID1396269
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent ce5c7260
...@@ -45,6 +45,7 @@ static void process_client(AVIOContext *client, const char *in_uri) ...@@ -45,6 +45,7 @@ static void process_client(AVIOContext *client, const char *in_uri)
// may return empty string. // may return empty string.
if (resource && strlen(resource)) if (resource && strlen(resource))
break; break;
av_freep(&resource);
} }
if (ret < 0) if (ret < 0)
goto end; goto end;
...@@ -93,6 +94,7 @@ end: ...@@ -93,6 +94,7 @@ end:
avio_close(client); avio_close(client);
fprintf(stderr, "Closing input\n"); fprintf(stderr, "Closing input\n");
avio_close(input); avio_close(input);
av_freep(&resource);
} }
int main(int argc, char **argv) int main(int argc, char **argv)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment