summaryrefslogtreecommitdiff
path: root/src/raptor_sax2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/raptor_sax2.c')
-rw-r--r--src/raptor_sax2.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/raptor_sax2.c b/src/raptor_sax2.c
index 2e6f73b6..450f7ac3 100644
--- a/src/raptor_sax2.c
+++ b/src/raptor_sax2.c
@@ -770,6 +770,15 @@ raptor_sax2_start_element(void* user_data, const unsigned char *name,
if(!el_name)
goto fail;
+#ifdef __clang_analyzer__
+ /* clang --analyze does not know about ownership of next call */
+ if(xml_language) {
+ free(xml_language); xml_language = NULL;
+ }
+ if(xml_base) {
+ raptor_free_uri(xml_base); xml_base = NULL;
+ }
+#endif
xml_element = raptor_new_xml_element(el_name, xml_language, xml_base);
if(!xml_element) {
raptor_free_qname(el_name);