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