1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-14 00:11:38 +02:00

doc/examples/http_multiclient: Fix resource leak

Fixes CID1396269

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2016-12-26 17:41:38 +01:00
parent ce5c7260df
commit 89d4d7d759

View File

@ -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)