e_loader_attic: fix a use after free issue

Fixes #15116

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15238)
This commit is contained in:
Pauli 2021-05-12 14:10:49 +10:00
parent 9a633a1c97
commit b1423d04cd
1 changed files with 1 additions and 1 deletions

View File

@ -199,6 +199,7 @@ static OSSL_STORE_INFO *new_EMBEDDED(const char *new_pem_name,
return NULL;
}
data->blob = embedded;
data->pem_name =
new_pem_name == NULL ? NULL : OPENSSL_strdup(new_pem_name);
@ -207,7 +208,6 @@ static OSSL_STORE_INFO *new_EMBEDDED(const char *new_pem_name,
store_info_free(info);
info = NULL;
}
data->blob = embedded;
return info;
}