[libxml2] fix: xmlXPathParserContext could be double-delete in OOM case.
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] fix: xmlXPathParserContext could be double-delete in OOM case.
- Date: Wed, 30 Mar 2022 14:35:59 +0000 (UTC)
commit 74263eff5f6212afa2196022ecd2fbc39c6d3c36
Author: jinsub ahn <jinniahn gmail com>
Date: Wed Mar 30 06:02:31 2022 +0000
fix: xmlXPathParserContext could be double-delete in OOM case.
xpath.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/xpath.c b/xpath.c
index 0953373a..0b31bc07 100644
--- a/xpath.c
+++ b/xpath.c
@@ -13858,7 +13858,7 @@ xmlXPathRunEval(xmlXPathParserContextPtr ctxt, int toBool)
xmlMalloc(10 * sizeof(xmlXPathObjectPtr));
if (ctxt->valueTab == NULL) {
xmlXPathPErrMemory(ctxt, "creating evaluation context\n");
- xmlFree(ctxt);
+ return(-1);
}
ctxt->valueNr = 0;
ctxt->valueMax = 10;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]