History

avformat/tls_openssl: remove unnecessary checks

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

Marvin Scholz committed 1 year ago

Commit aaffa9b1 parent 3abc8d51 file · +4 −4Browse files

Unified · Split

libavformat/tls_openssl.c+4−4
@@ -228,8 +228,8 @@ end: · 227 unmodified lines
228 av_bprint_finalize(&key_bp, NULL);228 av_bprint_finalize(&key_bp, NULL);
229 BIO_free(cert_b);229 BIO_free(cert_b);
230 av_bprint_finalize(&cert_bp, NULL);230 av_bprint_finalize(&cert_bp, NULL);
231 if (key_tem) av_free(key_tem);231 av_free(key_tem);
232 if (cert_tem) av_free(cert_tem);232 av_free(cert_tem);
233 return ret;233 return ret;
234}234}
235 235
@@ -392,8 +392,8 @@ int ff_ssl_gen_key_cert(char *key_buf, size_t key_sz, char *cert_buf, size_t cer · 156 unmodified lines
392 snprintf(key_buf, key_sz, "%s", key_tem);392 snprintf(key_buf, key_sz, "%s", key_tem);
393 snprintf(cert_buf, cert_sz, "%s", cert_tem);393 snprintf(cert_buf, cert_sz, "%s", cert_tem);
394 394
395 if (key_tem) av_free(key_tem);395 av_free(key_tem);
396 if (cert_tem) av_free(cert_tem);396 av_free(cert_tem);
397error:397error:
398 return ret;398 return ret;
399}399}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t