summaryrefslogtreecommitdiffstats
path: root/src/world.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-02-18 17:50:43 +0000
committerDavid Robillard <d@drobilla.net>2013-02-18 17:50:43 +0000
commitbcdcb433808243999b4e15aa04b8be51135f89de (patch)
treed98b95d460ec628ddcc254fa5134bfce1e73c46a /src/world.c
parent36c22be51af07fc96a9168684949b82b8f6e325c (diff)
downloadlilv-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.c15
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*