30 lines
677 B
Diff
30 lines
677 B
Diff
From 388653ae7f32fe19af71405f5d08d0f7cde7b2ba Mon Sep 17 00:00:00 2001
|
|
From: Huaxin Lu <luhuaxin1@huawei.com>
|
|
Date: Tue, 20 Feb 2024 12:50:23 +0800
|
|
Subject: [PATCH 24/26] Set dim_core_keyring to NULL when initialize failed
|
|
|
|
---
|
|
src/core/dim_core_sig.c | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/core/dim_core_sig.c b/src/core/dim_core_sig.c
|
|
index f142050..07e11d8 100644
|
|
--- a/src/core/dim_core_sig.c
|
|
+++ b/src/core/dim_core_sig.c
|
|
@@ -182,8 +182,11 @@ int dim_core_sig_init(void)
|
|
ret = 0;
|
|
err:
|
|
dim_vfree(data);
|
|
- if (ret < 0)
|
|
+ if (ret < 0) {
|
|
key_put(dim_core_keyring);
|
|
+ dim_core_keyring = NULL;
|
|
+ }
|
|
+
|
|
return ret;
|
|
}
|
|
|
|
--
|
|
2.33.0
|
|
|