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/world.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/world.c')
-rw-r--r-- | src/world.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/world.c b/src/world.c index 147690b..4262723 100644 --- a/src/world.c +++ b/src/world.c @@ -208,13 +208,14 @@ lilv_world_get(LilvWorld* world, const LilvNode* predicate, const LilvNode* object) { - return lilv_node_new_from_node( - world, - sord_get(world->model, - subject ? subject->node : NULL, - predicate ? predicate->node : NULL, - object ? object->node : NULL, - NULL)); + SordNode* snode = sord_get(world->model, + subject ? subject->node : NULL, + predicate ? predicate->node : NULL, + object ? object->node : NULL, + NULL); + LilvNode* lnode = lilv_node_new_from_node(world, snode); + sord_node_free(world->world, snode); + return lnode; } SordIter* |