diff options
author | David Robillard <d@drobilla.net> | 2011-04-27 21:23:25 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-04-27 21:23:25 +0000 |
commit | 03e318d5d80b0cfda96efc58e270693eeabe9a79 (patch) | |
tree | a8c139d374fb09e951b5373bde71eb53b9d4309e /src/port.c | |
parent | 3c1b7c2b6633cc1afee350f12d0bd7a7b3eeafa5 (diff) | |
download | lilv-03e318d5d80b0cfda96efc58e270693eeabe9a79.tar.gz lilv-03e318d5d80b0cfda96efc58e270693eeabe9a79.tar.bz2 lilv-03e318d5d80b0cfda96efc58e270693eeabe9a79.zip |
Fix memory leaks.
Don't modify model while reading it.
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@3199 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/port.c')
-rw-r--r-- | src/port.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -61,23 +61,23 @@ slv2_port_get_node(SLV2Plugin p, { SLV2Matches ports = slv2_plugin_find_statements( p, - slv2_node_copy(p->plugin_uri->val.uri_val), - slv2_node_copy(p->world->lv2_port_node), + p->plugin_uri->val.uri_val, + p->world->lv2_port_node, NULL); SLV2Node ret = NULL; FOREACH_MATCH(ports) { SLV2Node node = slv2_match_object(ports); SLV2Value symbol = slv2_plugin_get_unique( p, - slv2_node_copy(node), - slv2_node_copy(p->world->lv2_symbol_node)); + node, + p->world->lv2_symbol_node); const bool matches = slv2_value_equals(symbol, slv2_port_get_symbol(p, port)); slv2_value_free(symbol); if (matches) { - ret = slv2_node_copy(node); + ret = node; break; } } @@ -276,13 +276,13 @@ slv2_port_get_scale_points(SLV2Plugin p, SLV2Value value = slv2_plugin_get_unique( p, - slv2_node_copy(point), - slv2_node_copy(p->world->rdf_value_node)); + point, + p->world->rdf_value_node); SLV2Value label = slv2_plugin_get_unique( p, - slv2_node_copy(point), - slv2_node_copy(p->world->rdfs_label_node)); + point, + p->world->rdfs_label_node); if (value && label) { slv2_array_append(ret, slv2_scale_point_new(value, label)); |