]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/tls_mbedtls.c
avformat/movenc: Fix segfault upon allocation error
[ffmpeg] / libavformat / tls_mbedtls.c
index b42b76f8dbc3ad58d6b3a777722cd9e7bda3f7ca..965adf1be437cb86fa5bbf209c1f35afaf5297ae 100644 (file)
@@ -23,7 +23,7 @@
 #include <mbedtls/config.h>
 #include <mbedtls/ctr_drbg.h>
 #include <mbedtls/entropy.h>
-#include <mbedtls/net.h>
+#include <mbedtls/net_sockets.h>
 #include <mbedtls/platform.h>
 #include <mbedtls/ssl.h>
 #include <mbedtls/x509_crt.h>
@@ -62,6 +62,7 @@ static int tls_close(URLContext *h)
     mbedtls_ctr_drbg_free(&tls_ctx->ctr_drbg_context);
     mbedtls_entropy_free(&tls_ctx->entropy_context);
 
+    ffurl_closep(&tls_ctx->tls_shared.tcp);
     return 0;
 }