summaryrefslogtreecommitdiff
path: root/doc/examples/http_multiclient.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-12-26 17:41:38 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-12-26 18:29:00 +0100
commit89d4d7d759a59e8535b267b7f5af757f731da712 (patch)
tree69c4163b1e66e9f2a62a0daf11382043074e16fe /doc/examples/http_multiclient.c
parentce5c7260df2d66dd26a6fe9709cef66aa7139162 (diff)
doc/examples/http_multiclient: Fix resource leak
Fixes CID1396269 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'doc/examples/http_multiclient.c')
-rw-r--r--doc/examples/http_multiclient.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/examples/http_multiclient.c b/doc/examples/http_multiclient.c
index 7173c4db32..e2c2201a08 100644
--- a/doc/examples/http_multiclient.c
+++ b/doc/examples/http_multiclient.c
@@ -45,6 +45,7 @@ static void process_client(AVIOContext *client, const char *in_uri)
// may return empty string.
if (resource && strlen(resource))
break;
+ av_freep(&resource);
}
if (ret < 0)
goto end;
@@ -93,6 +94,7 @@ end:
avio_close(client);
fprintf(stderr, "Closing input\n");
avio_close(input);
+ av_freep(&resource);
}
int main(int argc, char **argv)