summaryrefslogtreecommitdiff
path: root/valid.c
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2023-03-12 16:06:19 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2023-03-12 16:06:19 +0100
commita57a7549fabfb7112510a2ee80a874e988200c32 (patch)
tree02176e824668802b7fae25bc5d65d41447722184 /valid.c
parent21cec82bea27aa7b15eb9618daf18a491be4a58a (diff)
downloadlibxml2-a57a7549fabfb7112510a2ee80a874e988200c32.tar.gz
valid: Allow xmlFreeValidCtxt(NULL)
Diffstat (limited to 'valid.c')
-rw-r--r--valid.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/valid.c b/valid.c
index 120627cc..4352a08b 100644
--- a/valid.c
+++ b/valid.c
@@ -879,6 +879,8 @@ xmlValidCtxtPtr xmlNewValidCtxt(void) {
*/
void
xmlFreeValidCtxt(xmlValidCtxtPtr cur) {
+ if (cur == NULL)
+ return;
if (cur->vstateTab != NULL)
xmlFree(cur->vstateTab);
if (cur->nodeTab != NULL)