If lh_OBJ_NAME_insert() fails then the allocated |onp| value is leaked.
RT#2238
Reviewed-by: Richard Levitte <levitte@openssl.org>
onp = OPENSSL_malloc(sizeof(*onp));
if (onp == NULL) {
/* ERROR */
onp = OPENSSL_malloc(sizeof(*onp));
if (onp == NULL) {
/* ERROR */
} else {
if (lh_OBJ_NAME_error(names_lh)) {
/* ERROR */
} else {
if (lh_OBJ_NAME_error(names_lh)) {
/* ERROR */
+ OPENSSL_free(onp);
+ return 0;
}
int OBJ_NAME_remove(const char *name, int type)
}
int OBJ_NAME_remove(const char *name, int type)