Memory leak was discovered through fuzz test case Schema
==8==ERROR:LeakSanitizer:detected memory leaks
Direct leak of 19 byte(s) in 1 object(s) allocated from:
#1 0x521a9d in malloc /src/llcm/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
#2 0x6afbcd in xmlStrndup /src/libxml2/xmlstring.c:45:23
#3 0x75669b in xmlSchemaValAtomicType /src/libxml2/xmlschemastypes.c:2174:10
#4 0x755304 in xmlSchemaValPredefTypeNode /src/libxml2/xmlschemastypes.c:3371:12
#5 0x6f6b7e in xmlSchemaPValAttrNodeValue /src/libxml2/xmlschemas.c:6314:12
#6 0x6f77c9 in xmlSchemaParseAnnotation /src/libxml2/xmlschemas.c:6626:3
#7 0x6f3c0f in xmlSchemaParseSchemaTopLevel /src/libxml2/xmlschemas.c:9787:14
#8 0x6e28d1 in xmlSchemaParseNewDocWithContext /src/libxml2/xmlschemas.c:10165:11
#9 0x6e0e49 in xmlSchemaParse /src/libxml2/xmlschemas.c:21377:9
#10 0x553e63 in LLVMFuzzerTestOneinput /src/libxml2/fuzz/schema.c:29:19
SUMMARY: AddressSanitizer: 19 byte(s) leaked in 1 allocation(s).
Edited by Nick Wellnhofer