From 080105d77a6064026400d02ff66397e82698f187 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Sat, 21 Oct 2023 19:53:04 +0800 Subject: [PATCH] hibernate-util: add missing assertion --- src/shared/hibernate-util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shared/hibernate-util.c b/src/shared/hibernate-util.c index 4a05320a40..51f64aa2b1 100644 --- a/src/shared/hibernate-util.c +++ b/src/shared/hibernate-util.c @@ -408,6 +408,8 @@ static int get_proc_meminfo_active(unsigned long long *ret) { unsigned long long active; int r; + assert(ret); + r = get_proc_field("/proc/meminfo", "Active(anon)", WHITESPACE, &active_str); if (r < 0) return log_debug_errno(r, "Failed to retrieve Active(anon) from /proc/meminfo: %m"); -- 2.25.1