]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-oomd-util: fix conditional jump on uninitialised value 22592/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 22 Feb 2022 11:23:58 +0000 (20:23 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 22 Feb 2022 11:24:22 +0000 (20:24 +0900)
Fixes #22577.

src/oom/test-oomd-util.c

index 23ce5dc0b6bfb77539b1f879ceacb46c2ef43007..f0283677f7cc8f75bc48f85034960a25ca1af72d 100644 (file)
@@ -283,7 +283,7 @@ static void test_oomd_system_context_acquire(void) {
 static void test_oomd_pressure_above(void) {
         _cleanup_hashmap_free_ Hashmap *h1 = NULL, *h2 = NULL;
         _cleanup_set_free_ Set *t1 = NULL, *t2 = NULL, *t3 = NULL;
-        OomdCGroupContext ctx[2], *c;
+        OomdCGroupContext ctx[2] = {}, *c;
         loadavg_t threshold;
 
         assert_se(store_loadavg_fixed_point(80, 0, &threshold) == 0);