1 Star 0 Fork 37

solarhu / libxml2

forked from src-openEuler / libxml2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Fix-memory-leak-in-runtest.c.patch 1.01 KB
一键复制 编辑 原始数据 按行查看 历史
From e1c2d0adf02692fd668cfbb7025db437f1f5490b Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Sun, 16 Aug 2020 22:22:57 +0200
Subject: [PATCH 120/139] Fix memory leak in runtest.c
---
runtest.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/runtest.c b/runtest.c
index 19ed629..0f178cb 100644
--- a/runtest.c
+++ b/runtest.c
@@ -2108,16 +2108,16 @@ errParseTest(const char *filename, const char *result, const char *err,
xmlDocDumpMemory(doc, (xmlChar **) &base, &size);
}
res = compareFileMem(result, base, size);
- if (res != 0) {
- fprintf(stderr, "Result for %s failed in %s\n", filename, result);
- return(-1);
- }
}
if (doc != NULL) {
if (base != NULL)
xmlFree((char *)base);
xmlFreeDoc(doc);
}
+ if (res != 0) {
+ fprintf(stderr, "Result for %s failed in %s\n", filename, result);
+ return(-1);
+ }
if (err != NULL) {
res = compareFileMem(err, testErrors, testErrorsSize);
if (res != 0) {
--
1.8.3.1
1
https://gitee.com/solarhu/libxml2.git
git@gitee.com:solarhu/libxml2.git
solarhu
libxml2
libxml2
master

搜索帮助