projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c682b7
)
process-util: add missing NULL initialization for _cleanup_ variable
author
Lennart Poettering
<lennart@poettering.net>
Tue, 23 Nov 2021 15:54:19 +0000
(16:54 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 23 Nov 2021 17:42:22 +0000
(18:42 +0100)
This is will otherwise trigger a bad memory access in the error path
src/basic/process-util.c
patch
|
blob
|
history
diff --git
a/src/basic/process-util.c
b/src/basic/process-util.c
index e5af3a1cc91f2e4ac0fe4e85dfa031e668d9980a..bea53ccb7d554505e8ca17f671a9c7709c426383 100644
(file)
--- 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);