diff options
author | David Robillard <d@drobilla.net> | 2013-02-18 17:50:43 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-02-18 17:50:43 +0000 |
commit | bcdcb433808243999b4e15aa04b8be51135f89de (patch) | |
tree | d98b95d460ec628ddcc254fa5134bfce1e73c46a /src/state.c | |
parent | 36c22be51af07fc96a9168684949b82b8f6e325c (diff) | |
download | lilv-bcdcb433808243999b4e15aa04b8be51135f89de.tar.gz lilv-bcdcb433808243999b4e15aa04b8be51135f89de.tar.bz2 lilv-bcdcb433808243999b4e15aa04b8be51135f89de.zip |
Fix SordNode leaks.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5056 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/state.c')
-rw-r--r-- | src/state.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/state.c b/src/state.c index 3176fd1..77f6365 100644 --- a/src/state.c +++ b/src/state.c @@ -659,14 +659,13 @@ lilv_state_new_from_string(LilvWorld* world, set_prefixes(env); serd_reader_read_string(reader, USTR(str)); - const SordNode* p = sord_new_uri(world->world, USTR(LILV_NS_RDF "type")); - const SordNode* o = sord_new_uri(world->world, USTR(LV2_PRESETS__Preset)); - SordIter* const i = sord_search(model, NULL, p, o, NULL); - const SordNode* s = sord_iter_get_node(i, SORD_SUBJECT); + SordNode* o = sord_new_uri(world->world, USTR(LV2_PRESETS__Preset)); + SordNode* s = sord_get(model, NULL, world->uris.rdf_a, o, NULL); LilvState* state = new_state_from_model(world, map, model, s, NULL); - sord_iter_free(i); + sord_node_free(world->world, s); + sord_node_free(world->world, o); serd_reader_free(reader); sord_free(model); serd_env_free(env); |