avformat: Replace ffurl_close() by ffurl_closep() where appropriate

It avoids leaving dangling pointers behind in memory.

Also remove redundant checks for whether the URLContext to be closed is
already NULL.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
Andreas Rheinhardt
2020-04-03 17:03:38 +02:00
parent af97c9865f
commit 82bf41f3ab
24 changed files with 43 additions and 71 deletions

View File

@@ -240,7 +240,7 @@ static int rtmpe_close(URLContext *h)
RTMPEContext *rt = h->priv_data;
ff_dh_free(rt->dh);
ffurl_close(rt->stream);
ffurl_closep(&rt->stream);
return 0;
}