From 5a71277b900164392dea0bc3800db1c67b9df8e1 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 14 Oct 2020 13:43:15 +0200 Subject: fixup! WIP: Add serd_node_from_syntax() and serd_node_to_syntax() --- src/node_syntax.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/node_syntax.c b/src/node_syntax.c index 10483188..913277d5 100644 --- a/src/node_syntax.c +++ b/src/node_syntax.c @@ -83,15 +83,15 @@ serd_node_to_syntax(const SerdNode* node, const SerdSyntax syntax) st = serd_writer_finish(writer); } - serd_buffer_sink_finish(&buffer); + char* const result = serd_buffer_sink_finish(&buffer); serd_writer_free(writer); serd_byte_sink_free(bsink); serd_world_free(world); if (st) { - serd_free(buffer.buf); + serd_free(result); return NULL; } - return (char*)buffer.buf; + return result; } -- cgit v1.2.1