Browse Source

Fix memory leaks.

git-svn-id: http://svn.drobilla.net/lad/trunk/sratom@4859 a436a847-0d15-0410-975c-d299462d15a1
zrythm_meson
David Robillard 10 years ago
parent
commit
b191564c12
  1. 4
      NEWS
  2. 4
      src/sratom.c

4
NEWS

@ -1,8 +1,9 @@ @@ -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; @@ -19,4 +20,3 @@ sratom (0.2.0) stable;
* Initial release
-- David Robillard <d@drobilla.net> Wed, 18 Apr 2012 15:14:11 -0400

4
src/sratom.c

@ -91,6 +91,7 @@ SRATOM_API @@ -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, @@ -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, @@ -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, @@ -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;
}

Loading…
Cancel
Save