naccyde / rpms / systemd

Forked from rpms/systemd a year ago
Clone
8d419f
From b93eca3f277547c7e45c6840f2a582b20319a93a Mon Sep 17 00:00:00 2001
8d419f
From: Yu Watanabe <watanabe.yu+github@gmail.com>
8d419f
Date: Sat, 18 Jun 2022 11:06:46 +0900
8d419f
Subject: [PATCH] locale: drop unnecessary allocation
8d419f
8d419f
Fixes a bug introduced by 3d36b5d7e7b191fca7c5c65dbab94d99cf5f0230.
8d419f
8d419f
Fixes #23777.
8d419f
8d419f
(cherry picked from commit e83cfbf97247e391e9fc19a7abb2712c77f3b4c0)
8d419f
8d419f
Related: #2087652
8d419f
---
8d419f
 src/locale/localed.c | 4 ----
8d419f
 1 file changed, 4 deletions(-)
8d419f
8d419f
diff --git a/src/locale/localed.c b/src/locale/localed.c
8d419f
index 2c324efb14..791b5e60dd 100644
8d419f
--- a/src/locale/localed.c
8d419f
+++ b/src/locale/localed.c
8d419f
@@ -152,10 +152,6 @@ static int property_get_locale(
8d419f
         if (r < 0)
8d419f
                 return r;
8d419f
 
8d419f
-        l = new0(char*, _VARIABLE_LC_MAX+1);
8d419f
-        if (!l)
8d419f
-                return -ENOMEM;
8d419f
-
8d419f
         r = locale_context_build_env(&c->locale_context, &l, NULL);
8d419f
         if (r < 0)
8d419f
                 return r;