diff options
author | David Robillard <d@drobilla.net> | 2012-11-23 03:47:23 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-11-23 03:47:23 +0000 |
commit | b191564c12a1032aa83e5741b0aaf723498cd508 (patch) | |
tree | 83d94552df811c41d5321611d2a139e743670698 /src | |
parent | 5ef528bbab43a264daf504b6873c501148039914 (diff) | |
download | sratom-b191564c12a1032aa83e5741b0aaf723498cd508.tar.gz sratom-b191564c12a1032aa83e5741b0aaf723498cd508.tar.bz2 sratom-b191564c12a1032aa83e5741b0aaf723498cd508.zip |
Fix memory leaks.
git-svn-id: http://svn.drobilla.net/lad/trunk/sratom@4859 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/sratom.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; } |