代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/btrfs-progs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 9c156ab9ca53e5fc15730a10d1773da04ea59d4d Mon Sep 17 00:00:00 2001
From: David Sterba <dsterba@suse.com>
Date: Wed, 3 Apr 2024 23:13:54 +0200
Subject: [PATCH] btrfs-progs: string-table: fix memory leak on exit path in
table_vprintf()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Reported by 'gcc -fanalyzer:
common/string-table.c:62:17: warning: leak of ‘msg’ [CWE-401] [-Wanalyzer-malloc-leak]
The 'msg' still allocated when returning from the function due to error,
free it.
Signed-off-by: David Sterba <dsterba@suse.com>
---
common/string-table.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/common/string-table.c b/common/string-table.c
index 298066c..6d941fa 100644
--- a/common/string-table.c
+++ b/common/string-table.c
@@ -57,6 +57,7 @@ char *table_vprintf(struct string_table *tab, unsigned int column, unsigned int
return NULL;
if (column >= tab->ncols || row >= tab->nrows) {
+ free(msg);
error("attempt to write outside of table: col %u row %u fmt %s",
column, row, fmt);
return NULL;
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。