richardphibel / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
ac3a84
From 944fa2afca2bd6bd4d1d5aecd265fd4756ee44e2 Mon Sep 17 00:00:00 2001
ac3a84
From: Li kunyu <kunyu@nfschina.com>
ac3a84
Date: Fri, 18 Nov 2022 16:10:24 +0900
ac3a84
Subject: [PATCH] boot/measure: fix oom check
ac3a84
ac3a84
(cherry picked from commit fc0cc6db1ecbaa16513125d3fd1a7d11e391a8ee)
ac3a84
ac3a84
Related: #2138081
ac3a84
---
ac3a84
 src/boot/measure.c | 2 +-
ac3a84
 1 file changed, 1 insertion(+), 1 deletion(-)
ac3a84
ac3a84
diff --git a/src/boot/measure.c b/src/boot/measure.c
ac3a84
index 4f16acedf0..0bbd386449 100644
ac3a84
--- a/src/boot/measure.c
ac3a84
+++ b/src/boot/measure.c
ac3a84
@@ -897,7 +897,7 @@ static int verb_sign(int argc, char *argv[], void *userdata) {
ac3a84
                         }
ac3a84
 
ac3a84
                         _cleanup_free_ void *sig = malloc(ss);
ac3a84
-                        if (!ss) {
ac3a84
+                        if (!sig) {
ac3a84
                                 r = log_oom();
ac3a84
                                 goto finish;
ac3a84
                         }