summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-04-20 04:07:15 +0000
committerDavid Robillard <d@drobilla.net>2007-04-20 04:07:15 +0000
commit500fab47e5e9aadb6e09a71a6c3447e97f3a6d6a (patch)
tree07c94d57421945cbd6dcfd0c5182acda2d37ef77 /src
parentbe95afee123c169b083049c2f441d3860a12fea0 (diff)
downloadlilv-500fab47e5e9aadb6e09a71a6c3447e97f3a6d6a.tar.gz
lilv-500fab47e5e9aadb6e09a71a6c3447e97f3a6d6a.tar.bz2
lilv-500fab47e5e9aadb6e09a71a6c3447e97f3a6d6a.zip
Fix memory leaks.
Make slv2_world_get_all_plugins O(1). git-svn-id: http://svn.drobilla.net/lad/slv2@462 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/world.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/world.c b/src/world.c
index e10e7d4..a682a35 100644
--- a/src/world.c
+++ b/src/world.c
@@ -228,6 +228,7 @@ slv2_world_load_all(SLV2World world)
librdf_free_node(plugin_node);
librdf_free_node(data_node);
+ librdf_free_node(binary_node);
librdf_query_results_next(results);
}
@@ -266,18 +267,7 @@ slv2_world_serialize(const char* filename)
SLV2Plugins
slv2_world_get_all_plugins(SLV2World world)
{
- // FIXME: Slow..
-
- // NULL deleter so user can free returned sequence without nuking
- // our locally stored plugins
- raptor_sequence* result = raptor_new_sequence(NULL, NULL);
-
- for (int i=0; i < raptor_sequence_size(world->plugins); ++i)
- raptor_sequence_push(result, raptor_sequence_get_at(world->plugins, i));
-
- // sorted?
-
- return result;
+ return world->plugins;
}