代码拉取完成,页面将自动刷新
From 9f2f9e28475abfaf9c2c756726f6f829c9183308 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
Date: Sat, 30 Mar 2024 14:35:01 +0100
Subject: [PATCH] checkpolicy: free identifiers on invalid typebounds
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Free the two identifiers on an invalid typebounds in the error branch,
similar to the success branch.
Reported-by: oss-fuzz (issue 67700)
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Acked-by: James Carter <jwcart2@gmail.com>
---
policy_define.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/policy_define.c b/policy_define.c
index 0cf938ea..92d1e5f2 100644
--- a/policy_define.c
+++ b/policy_define.c
@@ -1461,8 +1461,12 @@ int define_typebounds(void)
}
while ((id = queue_remove(id_queue))) {
- if (define_typebounds_helper(bounds, id))
+ if (define_typebounds_helper(bounds, id)) {
+ free(bounds);
+ free(id);
return -1;
+ }
+
free(id);
}
free(bounds);
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。