summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-12-29 10:19:37 -0500
committerDavid Robillard <d@drobilla.net>2017-12-29 10:44:36 -0500
commit3c427ddbbb38eb271dcd1b8d23cbe07c8a8be025 (patch)
treed338d5e01bc17a6d36f229846a8663eeb01fe3bb /utils
parent8c13a50d14f01935919bfb774b02d0cbfdd42fd7 (diff)
downloadlilv-3c427ddbbb38eb271dcd1b8d23cbe07c8a8be025.tar.gz
lilv-3c427ddbbb38eb271dcd1b8d23cbe07c8a8be025.tar.bz2
lilv-3c427ddbbb38eb271dcd1b8d23cbe07c8a8be025.zip
Fix potential memory leaks
Diffstat (limited to 'utils')
-rw-r--r--utils/lv2apply.c2
-rw-r--r--utils/lv2bench.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/utils/lv2apply.c b/utils/lv2apply.c
index 7fc07b2..7f45733 100644
--- a/utils/lv2apply.c
+++ b/utils/lv2apply.c
@@ -230,9 +230,11 @@ main(int argc, char** argv)
const char* plugin_uri = NULL;
for (int i = 1; i < argc; ++i) {
if (!strcmp(argv[i], "--version")) {
+ free(self.params);
print_version();
return 0;
} else if (!strcmp(argv[i], "--help")) {
+ free(self.params);
return print_usage(0);
} else if (!strcmp(argv[i], "-i")) {
self.in_path = argv[++i];
diff --git a/utils/lv2bench.c b/utils/lv2bench.c
index 3fd97da..e3eb57f 100644
--- a/utils/lv2bench.c
+++ b/utils/lv2bench.c
@@ -144,6 +144,7 @@ bench(const LilvPlugin* p, uint32_t sample_count, uint32_t block_size)
fprintf(stderr, "<%s> port %d neither input nor output, skipping\n",
uri, index);
lilv_instance_free(instance);
+ free(seq_out);
free(buf);
free(controls);
uri_table_destroy(&uri_table);
@@ -159,6 +160,7 @@ bench(const LilvPlugin* p, uint32_t sample_count, uint32_t block_size)
fprintf(stderr, "<%s> port %d has unknown type, skipping\n",
uri, index);
lilv_instance_free(instance);
+ free(seq_out);
free(buf);
free(controls);
uri_table_destroy(&uri_table);