Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/7121)
if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
DHerr(DH_F_DH_NEW_METHOD, ERR_R_INIT_FAIL);
-err:
- DH_free(ret);
- ret = NULL;
+ goto err;
}
return ret;
+
+ err:
+ DH_free(ret);
+ return NULL;
}
void DH_free(DH *r)
if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
DSAerr(DSA_F_DSA_NEW_METHOD, ERR_R_INIT_FAIL);
-err:
- DSA_free(ret);
- ret = NULL;
+ goto err;
}
return ret;
+
+ err:
+ DSA_free(ret);
+ return NULL;
}
void DSA_free(DSA *r)
}
return ret;
-err:
+ err:
EC_KEY_free(ret);
return NULL;
}
return ret;
-err:
+ err:
RSA_free(ret);
return NULL;
}