diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-11-23 16:54:19 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-11-23 18:42:22 +0100 |
commit | ed90de9fbcf4ccb55d604ebc0083bd8253dc6346 (patch) | |
tree | 9fcbd1b055c13e79c3a1345a3ec46fa2d1fe549e /src/basic | |
parent | Merge pull request #21440 from poettering/homed-initial-fs-size (diff) | |
download | systemd-ed90de9fbcf4ccb55d604ebc0083bd8253dc6346.tar.xz systemd-ed90de9fbcf4ccb55d604ebc0083bd8253dc6346.zip |
process-util: add missing NULL initialization for _cleanup_ variable
This is will otherwise trigger a bad memory access in the error path
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/process-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/process-util.c b/src/basic/process-util.c index e5af3a1cc9..bea53ccb7d 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c @@ -1491,7 +1491,7 @@ int set_oom_score_adjust(int value) { } int get_oom_score_adjust(int *ret) { - _cleanup_free_ char *t; + _cleanup_free_ char *t = NULL; int r, a; r = read_virtual_file("/proc/self/oom_score_adj", SIZE_MAX, &t, NULL); |