summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/libxml/src/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/libxml/src/tree.c')
-rw-r--r--chromium/third_party/libxml/src/tree.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/chromium/third_party/libxml/src/tree.c b/chromium/third_party/libxml/src/tree.c
index c707f598e8d..50b6763b480 100644
--- a/chromium/third_party/libxml/src/tree.c
+++ b/chromium/third_party/libxml/src/tree.c
@@ -1596,6 +1596,10 @@ xmlStringGetNodeList(const xmlDoc *doc, const xmlChar *value) {
*/
if (!xmlBufIsEmpty(buf)) {
node = xmlNewDocText(doc, NULL);
+ if (node == NULL) {
+ if (val != NULL) xmlFree(val);
+ goto out;
+ }
node->content = xmlBufDetach(buf);
if (last == NULL) {