projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78b30ee
)
locale-setup: use _cleanup_strv_free_
author
Lennart Poettering
<lennart@poettering.net>
Mon, 12 Nov 2018 11:50:06 +0000
(12:50 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 14 Nov 2018 16:01:54 +0000
(17:01 +0100)
src/core/locale-setup.c
patch
|
blob
|
history
diff --git
a/src/core/locale-setup.c
b/src/core/locale-setup.c
index c14523fee9f1a27d94884681fa3ecef225ba5184..c123f3906e4f1c135c39ebc56f36973c1a036dc4 100644
(file)
--- a/
src/core/locale-setup.c
+++ b/
src/core/locale-setup.c
@@
-14,8
+14,8
@@
#include "virt.h"
int locale_setup(char ***environment) {
- char **add;
char *variables[_VARIABLE_LC_MAX] = {};
+ _cleanup_strv_free_ char **add = NULL;
int r = 0, i;
if (detect_container() <= 0) {
@@
-64,7
+64,6
@@
int locale_setup(char ***environment) {
log_warning_errno(r, "Failed to read /etc/locale.conf: %m");
}
- add = NULL;
for (i = 0; i < _VARIABLE_LC_MAX; i++) {
char *s;
@@
-98,8
+97,6
@@
int locale_setup(char ***environment) {
r = 0;
finish:
- strv_free(add);
-
for (i = 0; i < _VARIABLE_LC_MAX; i++)
free(variables[i]);