-/* $OpenBSD: apps.c,v 1.44 2017/08/12 21:04:33 jsing Exp $ */
+/* $OpenBSD: apps.c,v 1.45 2018/02/07 04:25:19 jsing Exp $ */
/*
* Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
*
ret = PKCS12_parse(p12, pass, pkey, cert, ca);
die:
- if (p12)
- PKCS12_free(p12);
+ PKCS12_free(p12);
return ret;
}
rv = 1;
end:
- if (xis)
- sk_X509_INFO_pop_free(xis, X509_INFO_free);
+ sk_X509_INFO_pop_free(xis, X509_INFO_free);
if (rv == 0) {
if (pcerts) {
}
err:
- if (in != NULL)
- BIO_free(in);
- if (ai != NULL)
- ASN1_INTEGER_free(ai);
+ BIO_free(in);
+ ASN1_INTEGER_free(ai);
return (ret);
}
}
err:
- if (out != NULL)
- BIO_free_all(out);
- if (ai != NULL)
- ASN1_INTEGER_free(ai);
+ BIO_free_all(out);
+ ASN1_INTEGER_free(ai);
return (ret);
}
ret = 1;
error:
- if (!b)
- BN_free(btmp);
+ BN_free(btmp);
return ret;
}
}
err:
- if (dbattr_conf)
- NCONF_free(dbattr_conf);
- if (tmpdb)
- TXT_DB_free(tmpdb);
- if (in)
- BIO_free_all(in);
+ NCONF_free(dbattr_conf);
+ TXT_DB_free(tmpdb);
+ BIO_free_all(in);
return retdb;
}
free_index(CA_DB *db)
{
if (db) {
- if (db->db)
- TXT_DB_free(db->db);
+ TXT_DB_free(db->db);
free(db);
}
}
return 0;
if (*badarg) {
- if (*pm)
- X509_VERIFY_PARAM_free(*pm);
+ X509_VERIFY_PARAM_free(*pm);
*pm = NULL;
goto end;
}
nodes_print(out, "Authority", X509_policy_tree_get0_policies(tree));
nodes_print(out, "User", X509_policy_tree_get0_user_policies(tree));
- if (free_out)
- BIO_free(out);
+
+ BIO_free(out);
}
/*