naccyde / rpms / systemd

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