mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-06-19 19:03:00 +02: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:
@@ -142,8 +142,7 @@ static int tls_close(URLContext *h)
|
||||
}
|
||||
if (c->ctx)
|
||||
SSL_CTX_free(c->ctx);
|
||||
if (c->tls_shared.tcp)
|
||||
ffurl_close(c->tls_shared.tcp);
|
||||
ffurl_closep(&c->tls_shared.tcp);
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
|
||||
if (c->url_bio_method)
|
||||
BIO_meth_free(c->url_bio_method);
|
||||
|
||||
Reference in New Issue
Block a user