summaryrefslogtreecommitdiffstats
path: root/src/port.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-01-31 05:23:36 +0000
committerDavid Robillard <d@drobilla.net>2011-01-31 05:23:36 +0000
commitd81b0c688ddb864fe6ebfee818dc1af76c7bc97b (patch)
tree009d3ac998a34eb63cb5de5632a84d402276a713 /src/port.c
parentd5ad97feaff9bcb767d579c71451440a71b1464a (diff)
downloadlilv-d81b0c688ddb864fe6ebfee818dc1af76c7bc97b.tar.gz
lilv-d81b0c688ddb864fe6ebfee818dc1af76c7bc97b.tar.bz2
lilv-d81b0c688ddb864fe6ebfee818dc1af76c7bc97b.zip
Fix memory leaks.
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@2887 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/port.c')
-rw-r--r--src/port.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/port.c b/src/port.c
index 19692cc..a1c9046 100644
--- a/src/port.c
+++ b/src/port.c
@@ -81,7 +81,11 @@ slv2_port_get_node(SLV2Plugin p,
librdf_new_node_from_node(node),
librdf_new_node_from_node(p->world->lv2_symbol_node));
- if (slv2_value_equals(symbol, slv2_port_get_symbol(p, port))) {
+ const bool matches = slv2_value_equals(symbol,
+ slv2_port_get_symbol(p, port));
+
+ slv2_value_free(symbol);
+ if (matches) {
ret = librdf_new_node_from_node(node);
break;
}
@@ -136,6 +140,7 @@ static SLV2Values
slv2_values_from_stream_objects(SLV2Plugin p, SLV2Matches stream)
{
if (slv2_matches_end(stream)) {
+ END_MATCH(stream);
return NULL;
}
@@ -170,6 +175,7 @@ slv2_port_get_value_by_qname(SLV2Plugin p,
librdf_new_node_from_uri_string(p->world->world, (const uint8_t*)pred_uri),
NULL);
+ free(pred_uri);
return slv2_values_from_stream_objects(p, results);
}
@@ -227,6 +233,7 @@ slv2_port_get_value_by_qname_i18n(SLV2Plugin p,
librdf_new_node_from_uri_string(p->world->world, (const uint8_t*)pred_uri),
NULL);
+ free(pred_uri);
return slv2_values_from_stream_i18n(p, results);
}