summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Beckett <dave@dajobe.org>2020-10-06 20:12:37 -0700
committerDave Beckett <dave@dajobe.org>2020-10-06 20:12:37 -0700
commite4c37cbf0ef75bfe7801d65dc3c764c7ddba090b (patch)
treec8914d92bc69bc12ddbc803caef389d3c770b7eb
parent2f8a2a6b706a02aaafb3efdbdb8365aaabb9e222 (diff)
downloadraptor-e4c37cbf0ef75bfe7801d65dc3c764c7ddba090b.tar.gz
(raptor_stringbuffer_append_turtle_string): Work around clang --analyze warning not understanding ownership model
-rw-r--r--src/turtle_common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/turtle_common.c b/src/turtle_common.c
index adb68e63..c822b347 100644
--- a/src/turtle_common.c
+++ b/src/turtle_common.c
@@ -200,6 +200,10 @@ raptor_stringbuffer_append_turtle_string(raptor_stringbuffer* stringbuffer,
/* calculate output string size */
len = d-string;
+#ifdef __clang_analyzer__
+ /* clang --analyze does not know about ownership of next call */
+ free(string); string = NULL;
+#endif
/* string gets owned by the stringbuffer after this */
return raptor_stringbuffer_append_counted_string(stringbuffer,
string, len, 0);