mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-23 09:01:00 +08:00
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:
@@ -68,10 +68,7 @@ static int gopher_connect(URLContext *h, const char *path)
|
||||
static int gopher_close(URLContext *h)
|
||||
{
|
||||
GopherContext *s = h->priv_data;
|
||||
if (s->hd) {
|
||||
ffurl_close(s->hd);
|
||||
s->hd = NULL;
|
||||
}
|
||||
ffurl_closep(&s->hd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user