From b191564c12a1032aa83e5741b0aaf723498cd508 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 23 Nov 2012 03:47:23 +0000 Subject: Fix memory leaks. git-svn-id: http://svn.drobilla.net/lad/trunk/sratom@4859 a436a847-0d15-0410-975c-d299462d15a1 --- src/sratom.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/sratom.c b/src/sratom.c index 4d0054a..7792b9c 100644 --- a/src/sratom.c +++ b/src/sratom.c @@ -91,6 +91,7 @@ SRATOM_API void sratom_free(Sratom* sratom) { + serd_node_free(&sratom->base_uri); free(sratom); } @@ -230,6 +231,7 @@ sratom_write(Sratom* sratom, } else if (type_urid == sratom->forge.Chunk) { datatype = serd_node_from_string(SERD_URI, NS_XSD "base64Binary"); object = serd_node_new_blob(body, size, true); + new_node = true; } else if (type_urid == sratom->forge.Literal) { const LV2_Atom_Literal_Body* lit = (const LV2_Atom_Literal_Body*)body; const uint8_t* str = USTR(lit + 1); @@ -476,6 +478,7 @@ sratom_to_turtle(Sratom* sratom, serd_writer_free(writer); serd_env_free(env); + serd_node_free(&base); return (char*)serd_chunk_sink_finish(&str); } @@ -787,6 +790,7 @@ sratom_from_turtle(Sratom* sratom, serd_env_free(env); sord_free(model); sord_world_free(world); + serd_node_free(&base); return (LV2_Atom*)out.buf; } -- cgit v1.2.1