diff options
author | xujing <17826839720@163.com> | 2021-09-08 08:26:20 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-09-08 15:42:22 +0200 |
commit | 1509274359979079e3e61899ce12fc8b0f0958d9 (patch) | |
tree | 5e69cc33ccbdd034e2227c11745a1896c46cf808 /src/core/load-fragment.c | |
parent | test: rename `dracut_install` to `image_install` (diff) | |
download | systemd-1509274359979079e3e61899ce12fc8b0f0958d9.tar.xz systemd-1509274359979079e3e61899ce12fc8b0f0958d9.zip |
core: fix free undefined pointer when strdup failed in the first loop
Diffstat (limited to '')
-rw-r--r-- | src/core/load-fragment.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index 92815b1dba..1c8159a235 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -800,7 +800,7 @@ int config_parse_exec( if (!separate_argv0) { char *w = NULL; - if (!GREEDY_REALLOC(n, nlen + 2)) + if (!GREEDY_REALLOC0(n, nlen + 2)) return log_oom(); w = strdup(path); @@ -832,7 +832,7 @@ int config_parse_exec( p += 2; p += strspn(p, WHITESPACE); - if (!GREEDY_REALLOC(n, nlen + 2)) + if (!GREEDY_REALLOC0(n, nlen + 2)) return log_oom(); w = strdup(";"); |