ffmpeg | branch: master | Marvin Scholz <epira...@gmail.com> | Wed Jun 25 
21:41:16 2025 +0200| [aaffa9bc72e0e926cb23752d4864db9c5e4bc80b] | committer: 
Marvin Scholz

avformat/tls_openssl: remove unnecessary checks

Calling av_free with NULL is a no-op so this check is not needed.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aaffa9bc72e0e926cb23752d4864db9c5e4bc80b
---

 libavformat/tls_openssl.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c
index 404d2186f1..18df55f9fc 100644
--- a/libavformat/tls_openssl.c
+++ b/libavformat/tls_openssl.c
@@ -228,8 +228,8 @@ end:
     av_bprint_finalize(&key_bp, NULL);
     BIO_free(cert_b);
     av_bprint_finalize(&cert_bp, NULL);
-    if (key_tem) av_free(key_tem);
-    if (cert_tem) av_free(cert_tem);
+    av_free(key_tem);
+    av_free(cert_tem);
     return ret;
 }
 
@@ -392,8 +392,8 @@ int ff_ssl_gen_key_cert(char *key_buf, size_t key_sz, char 
*cert_buf, size_t cer
     snprintf(key_buf,  key_sz,  "%s", key_tem);
     snprintf(cert_buf, cert_sz, "%s", cert_tem);
 
-    if (key_tem) av_free(key_tem);
-    if (cert_tem) av_free(cert_tem);
+    av_free(key_tem);
+    av_free(cert_tem);
 error:
     return ret;
 }

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to