From: Dan Streetman Date: Mon, 21 Aug 2023 22:14:07 +0000 (-0400) Subject: openssl: use new(char, size) instead of malloc(size) X-Git-Tag: v255-rc1~630^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0307102951f57becf733f740710bc826e1609ba;p=thirdparty%2Fsystemd.git openssl: use new(char, size) instead of malloc(size) --- diff --git a/src/shared/openssl-util.c b/src/shared/openssl-util.c index db45b23aafb..3d3d8090f8c 100644 --- a/src/shared/openssl-util.c +++ b/src/shared/openssl-util.c @@ -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();