summaryrefslogtreecommitdiff
path: root/xpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'xpath.c')
-rw-r--r--xpath.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xpath.c b/xpath.c
index ceed3f21..5cacc2cb 100644
--- a/xpath.c
+++ b/xpath.c
@@ -10272,7 +10272,10 @@ xmlXPathCompLiteral(xmlXPathParserContextPtr ctxt) {
} else {
XP_ERROR(XPATH_START_LITERAL_ERROR);
}
- if (ret == NULL) return;
+ if (ret == NULL) {
+ xmlXPathPErrMemory(ctxt, NULL);
+ return;
+ }
lit = xmlXPathCacheNewString(ctxt->context, ret);
if (lit == NULL) {
ctxt->error = XPATH_MEMORY_ERROR;