summaryrefslogtreecommitdiff
path: root/ext/dom/domimplementation.c
diff options
context:
space:
mode:
authorRob Richards <rrichards@php.net>2006-12-21 12:51:26 (GMT)
committerRob Richards <rrichards@php.net>2006-12-21 12:51:26 (GMT)
commit60941b02dc1f2ad238f51b7e6d8bd8eb79718e47 (patch)
treefb5a6569e2e0a14320cc38df8ab3aab252dd0a47 /ext/dom/domimplementation.c
parent6546914e68a65de5497fc8762fe293c651c44973 (diff)
downloadphp-60941b02dc1f2ad238f51b7e6d8bd8eb79718e47.tar.gz
fix issues identitified by coverity
Diffstat (limited to 'ext/dom/domimplementation.c')
-rw-r--r--ext/dom/domimplementation.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/dom/domimplementation.c b/ext/dom/domimplementation.c
index f65da05..9c1613b 100644
--- a/ext/dom/domimplementation.c
+++ b/ext/dom/domimplementation.c
@@ -115,6 +115,11 @@ PHP_METHOD(domimplementation, createDocumentType)
doctype = xmlCreateIntSubset(NULL, localname, pch1, pch2);
xmlFree(localname);
+ if (doctype == NULL) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create DocumentType");
+ RETURN_FALSE;
+ }
+
DOM_RET_OBJ(rv, (xmlNodePtr) doctype, &ret, NULL);
}
/* }}} end dom_domimplementation_create_document_type */