mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-08-13 04:45:05 +02:00
doc/examples/http_multiclient: Fix resource leak
Fixes CID1396269 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
ce5c7260df
commit
89d4d7d759
@ -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:
|
|||||||
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user