aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarvin Scholz <epirat07@gmail.com>2025-06-25 21:41:16 +0200
committerMarvin Scholz <epirat07@gmail.com>2025-07-07 01:52:46 +0200
commitaaffa9bc72e0e926cb23752d4864db9c5e4bc80b (patch)
treeb16cc97e43f0d219bf05994eb698d1fbade58565
parent3abc8d507b0616d644166418a9269c42e574c6a4 (diff)
downloadffmpeg-aaffa9bc72e0e926cb23752d4864db9c5e4bc80b.tar.gz
avformat/tls_openssl: remove unnecessary checks
Calling av_free with NULL is a no-op so this check is not needed.
-rw-r--r--libavformat/tls_openssl.c8
1 files 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;
}