mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +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:
@@ -310,7 +310,7 @@ static int cache_close(URLContext *h)
|
||||
av_log(h, AV_LOG_ERROR, "Could not delete %s.\n", c->filename);
|
||||
av_freep(&c->filename);
|
||||
}
|
||||
ffurl_close(c->inner);
|
||||
ffurl_closep(&c->inner);
|
||||
av_tree_enumerate(c->root, NULL, NULL, enu_free);
|
||||
av_tree_destroy(c->root);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user