diff options
| author | deraadt <> | 2014-05-30 06:22:57 +0000 |
|---|---|---|
| committer | deraadt <> | 2014-05-30 06:22:57 +0000 |
| commit | 93efbaa11c9b941fe460a1f6bfa75b21d8624e53 (patch) | |
| tree | 1ff700d79cee9e764329e5c50d7eb8d5109789cc /src/lib/libcrypto/x509v3/v3_utl.c | |
| parent | 4aef4566c1a41608b7d78a7d5cfc3e031b7e4fe3 (diff) | |
| download | openbsd-93efbaa11c9b941fe460a1f6bfa75b21d8624e53.tar.gz openbsd-93efbaa11c9b941fe460a1f6bfa75b21d8624e53.tar.bz2 openbsd-93efbaa11c9b941fe460a1f6bfa75b21d8624e53.zip | |
more: no need for null check before free
ok tedu guenther
Diffstat (limited to 'src/lib/libcrypto/x509v3/v3_utl.c')
| -rw-r--r-- | src/lib/libcrypto/x509v3/v3_utl.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_utl.c b/src/lib/libcrypto/x509v3/v3_utl.c index 0b389807dd..3134feff21 100644 --- a/src/lib/libcrypto/x509v3/v3_utl.c +++ b/src/lib/libcrypto/x509v3/v3_utl.c | |||
| @@ -103,12 +103,9 @@ X509V3_add_value(const char *name, const char *value, | |||
| 103 | 103 | ||
| 104 | err: | 104 | err: |
| 105 | X509V3err(X509V3_F_X509V3_ADD_VALUE, ERR_R_MALLOC_FAILURE); | 105 | X509V3err(X509V3_F_X509V3_ADD_VALUE, ERR_R_MALLOC_FAILURE); |
| 106 | if (vtmp) | 106 | free(vtmp); |
| 107 | free(vtmp); | 107 | free(tname); |
| 108 | if (tname) | 108 | free(tvalue); |
| 109 | free(tname); | ||
| 110 | if (tvalue) | ||
| 111 | free(tvalue); | ||
| 112 | return 0; | 109 | return 0; |
| 113 | } | 110 | } |
| 114 | 111 | ||
| @@ -126,12 +123,9 @@ X509V3_conf_free(CONF_VALUE *conf) | |||
| 126 | { | 123 | { |
| 127 | if (!conf) | 124 | if (!conf) |
| 128 | return; | 125 | return; |
| 129 | if (conf->name) | 126 | free(conf->name); |
| 130 | free(conf->name); | 127 | free(conf->value); |
| 131 | if (conf->value) | 128 | free(conf->section); |
| 132 | free(conf->value); | ||
| 133 | if (conf->section) | ||
| 134 | free(conf->section); | ||
| 135 | free(conf); | 129 | free(conf); |
| 136 | } | 130 | } |
| 137 | 131 | ||
