summaryrefslogtreecommitdiffstats
path: root/src/port.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-09-02 08:26:17 +0000
committerDavid Robillard <d@drobilla.net>2006-09-02 08:26:17 +0000
commit69e52cb83cf0233648695730c81cdc4f7c4f2a00 (patch)
tree5e8ebb5773cba2c1ffd827baf9a4fe528fbcaeeb /src/port.c
parentcf11310c243320bbe53dbf7c6738cc84e33ba9d3 (diff)
downloadlilv-69e52cb83cf0233648695730c81cdc4f7c4f2a00.tar.gz
lilv-69e52cb83cf0233648695730c81cdc4f7c4f2a00.tar.bz2
lilv-69e52cb83cf0233648695730c81cdc4f7c4f2a00.zip
Schema bug fixes (parsable now).
Fixed some leaks. Internal query API cleanups. Added latency reporting support. git-svn-id: http://svn.drobilla.net/lad/libslv2@110 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/port.c')
-rw-r--r--src/port.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/port.c b/src/port.c
index db18ab8..111517d 100644
--- a/src/port.c
+++ b/src/port.c
@@ -61,6 +61,8 @@ slv2_port_get_data_type(SLV2Plugin* p,
assert(type->values);
char* ret = type->values[0];
+ type->values[0] = NULL; // prevent deletion
+
slv2_property_free(type);
return ret;
}
@@ -87,7 +89,7 @@ slv2_port_get_property(SLV2Plugin* p,
rasqal_query_results* results = slv2_plugin_run_query(p, query);
- SLV2Property result = slv2_query_get_results(results);
+ SLV2Property result = slv2_query_get_results(results, "value");
rasqal_free_query_results(results);
rasqal_finish();
@@ -107,8 +109,11 @@ slv2_port_get_symbol(SLV2Plugin* p,
SLV2Property prop
= slv2_port_get_property(p, index, "lv2:symbol");
- if (prop && prop->num_values == 1)
- result = strdup(prop->values[0]);
+ if (prop && prop->num_values == 1) {
+ result = prop->values[0];
+ prop->values[0] = NULL; // prevent deletion
+ }
+
slv2_property_free(prop);
return result;