summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS4
-rw-r--r--src/sratom.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 285c886..12b53d3 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,9 @@
sratom (0.4.1) unstable;
+ * Fix memory leaks
* Disable timestamps in HTML documentation for reproducible build
- -- David Robillard <d@drobilla.net> Sun, 09 Sep 2012 03:19:01 -0400
+ -- David Robillard <d@drobilla.net> Thu, 22 Nov 2012 22:45:27 -0500
sratom (0.4.0) stable;
@@ -19,4 +20,3 @@ sratom (0.2.0) stable;
* Initial release
-- David Robillard <d@drobilla.net> Wed, 18 Apr 2012 15:14:11 -0400
-
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;
}