diff options
Diffstat (limited to 'src/lib/libcrypto/x509/x509_trs.c')
-rw-r--r-- | src/lib/libcrypto/x509/x509_trs.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/x509/x509_trs.c b/src/lib/libcrypto/x509/x509_trs.c index 7bb5094e64..bdda53ec6b 100644 --- a/src/lib/libcrypto/x509/x509_trs.c +++ b/src/lib/libcrypto/x509/x509_trs.c | |||
@@ -174,7 +174,8 @@ int X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int), | |||
174 | return 0; | 174 | return 0; |
175 | } | 175 | } |
176 | trtmp->flags = X509_TRUST_DYNAMIC; | 176 | trtmp->flags = X509_TRUST_DYNAMIC; |
177 | } else trtmp = X509_TRUST_get0(idx); | 177 | } else |
178 | trtmp = X509_TRUST_get0(idx); | ||
178 | 179 | ||
179 | /* free existing name if dynamic */ | 180 | /* free existing name if dynamic */ |
180 | if(trtmp->flags & X509_TRUST_DYNAMIC_NAME) free(trtmp->name); | 181 | if(trtmp->flags & X509_TRUST_DYNAMIC_NAME) free(trtmp->name); |
@@ -208,15 +209,14 @@ int X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int), | |||
208 | } | 209 | } |
209 | 210 | ||
210 | static void trtable_free(X509_TRUST *p) | 211 | static void trtable_free(X509_TRUST *p) |
211 | { | 212 | { |
212 | if(!p) return; | 213 | if(!p) return; |
213 | if (p->flags & X509_TRUST_DYNAMIC) | 214 | if (p->flags & X509_TRUST_DYNAMIC) { |
214 | { | ||
215 | if (p->flags & X509_TRUST_DYNAMIC_NAME) | 215 | if (p->flags & X509_TRUST_DYNAMIC_NAME) |
216 | free(p->name); | 216 | free(p->name); |
217 | free(p); | 217 | free(p); |
218 | } | ||
219 | } | 218 | } |
219 | } | ||
220 | 220 | ||
221 | void X509_TRUST_cleanup(void) | 221 | void X509_TRUST_cleanup(void) |
222 | { | 222 | { |