summaryrefslogtreecommitdiffstats
path: root/src/port.c
diff options
context:
space:
mode:
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;