• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From 43555b3ff9c28a44aa27f447475b9f9cfccbe702 Mon Sep 17 00:00:00 2001
2From: xiezhipeng <xiezhipeng1@huawei.com>
3Date: Fri, 24 Jun 2022 09:39:54 +0800
4Subject: [PATCH] fix memory leaks in xmlACatalogAdd
5
6---
7 catalog.c | 2 ++
8 1 file changed, 2 insertions(+)
9
10diff --git a/catalog.c b/catalog.c
11index effbb2e..866e753 100644
12--- a/catalog.c
13+++ b/catalog.c
14@@ -2981,6 +2981,8 @@ xmlACatalogAdd(xmlCatalogPtr catal, const xmlChar * type,
15 	    if (catal->sgml == NULL)
16 		catal->sgml = xmlHashCreate(10);
17             res = xmlHashAddEntry(catal->sgml, orig, entry);
18+            if (res)
19+                xmlFreeCatalogEntry(entry, NULL);
20         }
21     }
22     return (res);
23--
241.8.3.1
25
26