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
228228 av_bprint_finalize(&key_bp, NULL);
229229 BIO_free(cert_b);
230230 av_bprint_finalize(&cert_bp, NULL);
231− if (key_tem) av_free(key_tem);
232− if (cert_tem) av_free(cert_tem);
231+ av_free(key_tem);
232+ av_free(cert_tem);
233233 return ret;
234234 }
235235
@@ -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
392392 snprintf(key_buf, key_sz, "%s", key_tem);
393393 snprintf(cert_buf, cert_sz, "%s", cert_tem);
394394
395− if (key_tem) av_free(key_tem);
396− if (cert_tem) av_free(cert_tem);
395+ av_free(key_tem);
396+ av_free(cert_tem);
397397 error:
398398 return ret;
399399 }

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