OPENSSL_free(port);
if (bio)
BIO_free_all(bio);
- if (rctx)
- OCSP_REQ_CTX_free(rctx);
+ OCSP_REQ_CTX_free(rctx);
if (rv != 1) {
BIO_printf(bio_err, "Error loading %s from %s\n",
pcert ? "certificate" : "CRL", url);
err:
if (dbattr_conf)
NCONF_free(dbattr_conf);
- if (tmpdb)
- TXT_DB_free(tmpdb);
+ TXT_DB_free(tmpdb);
BIO_free_all(in);
return retdb;
}
void free_index(CA_DB *db)
{
if (db) {
- if (db->db)
- TXT_DB_free(db->db);
+ TXT_DB_free(db->db);
OPENSSL_free(db);
}
}
}
err:
- if (ctx)
- OCSP_REQ_CTX_free(ctx);
+ OCSP_REQ_CTX_free(ctx);
return rsp;
}
void ECDSA_METHOD_free(ECDSA_METHOD *ecdsa_method)
{
+ if (!ecdsa_method)
+ return;
if (ecdsa_method->flags & ECDSA_METHOD_FLAG_ALLOCATED)
OPENSSL_free(ecdsa_method);
}
void JPAKE_CTX_free(JPAKE_CTX *ctx)
{
+ if (!ctx)
+ return;
JPAKE_CTX_release(ctx);
OPENSSL_free(ctx);
}
void OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx)
{
+ if (!rctx)
+ return;
BIO_free(rctx->mem);
if (rctx->iobuf)
OPENSSL_free(rctx->iobuf);
return vb;
}
-int SRP_VBASE_free(SRP_VBASE *vb)
+void SRP_VBASE_free(SRP_VBASE *vb)
{
+ if (!vb)
+ return;
sk_SRP_user_pwd_pop_free(vb->users_pwd, SRP_user_pwd_free);
sk_SRP_gN_cache_free(vb->gN_cache);
OPENSSL_free(vb->seed_key);
OPENSSL_free(vb);
- return 0;
}
static SRP_gN_cache *SRP_gN_new_init(const char *ch)
SRP_user_pwd_free(user_pwd);
- if (tmpdb)
- TXT_DB_free(tmpdb);
+ TXT_DB_free(tmpdb);
BIO_free_all(in);
sk_SRP_gN_free(SRP_gN_tab);
BN_bin2bn(digv, SHA_DIGEST_LENGTH, NULL)))
return user;
- err:SRP_user_pwd_free(user);
+ err:
+ SRP_user_pwd_free(user);
return NULL;
}
memerr:
X509V3err(X509V3_F_V2I_NAME_CONSTRAINTS, ERR_R_MALLOC_FAILURE);
err:
- if (ncons)
- NAME_CONSTRAINTS_free(ncons);
- if (sub)
- GENERAL_SUBTREE_free(sub);
+ NAME_CONSTRAINTS_free(ncons);
+ GENERAL_SUBTREE_free(sub);
return NULL;
}
static void SCT_free(SCT *sct)
{
- if (sct) {
- if (sct->sct)
- OPENSSL_free(sct->sct);
- OPENSSL_free(sct);
- }
+ if (!sct)
+ return;
+ if (sct->sct)
+ OPENSSL_free(sct->sct);
+ OPENSSL_free(sct);
}
static void SCT_LIST_free(STACK_OF(SCT) *a)
DECLARE_STACK_OF(SRP_gN)
SRP_VBASE *SRP_VBASE_new(char *seed_key);
-int SRP_VBASE_free(SRP_VBASE *vb);
+void SRP_VBASE_free(SRP_VBASE *vb);
int SRP_VBASE_init(SRP_VBASE *vb, char *verifier_file);
SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username);
char *SRP_create_verifier(const char *user, const char *pass, char **salt,