summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-09-18 14:04:43 -0400
committerDavid Robillard <d@drobilla.net>2016-09-18 14:05:31 -0400
commitea25ed64486ca1e28840d2934e0103a21edbb5ce (patch)
treec4e766cc682e871826696cb7726f4717a6db2c72 /src
parent1d9bc02f315cd8a0abbece347ed398677524a258 (diff)
downloadsord-ea25ed64486ca1e28840d2934e0103a21edbb5ce.tar.gz
sord-ea25ed64486ca1e28840d2934e0103a21edbb5ce.tar.bz2
sord-ea25ed64486ca1e28840d2934e0103a21edbb5ce.zip
Fix test suite memory leaks
Diffstat (limited to 'src')
-rw-r--r--src/sord_test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sord_test.c b/src/sord_test.c
index 6c74017..6796e0e 100644
--- a/src/sord_test.c
+++ b/src/sord_test.c
@@ -689,6 +689,7 @@ main(int argc, char** argv)
if (sord_erase(sord, iter)) {
return test_fail("Failed to erase begin iterator on non-empty model\n");
}
+ sord_iter_free(iter);
// Ensure only the other graph is left
SordQuad quad;
@@ -719,6 +720,8 @@ main(int argc, char** argv)
fprintf(stderr, "Failed to re-read string (%s)\n", serd_strerror(st));
goto fail;
}
+ serd_reader_free(reader);
+ serd_env_free(env);
// Ensure we only see triple once
size_t n_triples = 0;
@@ -731,6 +734,7 @@ main(int argc, char** argv)
++n_triples;
}
+ sord_iter_free(iter);
if (n_triples != 1) {
fprintf(stderr, "Found duplicate triple\n");
goto fail;
@@ -743,6 +747,7 @@ main(int argc, char** argv)
for (iter = sord_begin(sord); !sord_iter_end(iter); sord_iter_next(iter)) {
++n_triples;
}
+ sord_iter_free(iter);
sord_free(sord);
sord_world_free(world);