mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
openssl: use new(char, size) instead of malloc(size)
This commit is contained in:
parent
65fd657e0a
commit
b030710295
@ -403,7 +403,7 @@ int ecc_pkey_to_curve_x_y(
|
||||
if (!EVP_PKEY_get_utf8_string_param(pkey, OSSL_PKEY_PARAM_GROUP_NAME, NULL, 0, &name_size))
|
||||
return log_openssl_errors("Failed to get ECC group name size");
|
||||
|
||||
_cleanup_free_ char *name = malloc(name_size + 1);
|
||||
_cleanup_free_ char *name = new(char, name_size + 1);
|
||||
if (!name)
|
||||
return log_oom_debug();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user