From 4b1832ba51f1b6b722810a1fa83333ace84152da Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 17 Nov 2014 06:44:49 +0000 Subject: Fix a few minor/unlikely memory errors. git-svn-id: http://svn.drobilla.net/lad/trunk/suil@5485 a436a847-0d15-0410-975c-d299462d15a1 --- NEWS | 3 ++- src/instance.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 9c82575..4e8fca7 100644 --- a/NEWS +++ b/NEWS @@ -3,8 +3,9 @@ suil (0.8.3) unstable; * Configure based on compiler target OS for cross-compilation * Add Cocoa in Gtk wrapper (patch from Robin Gareus) * Fix compilation with -Wl,--no-undefined + * Fix a few minor/unlikely memory errors - -- David Robillard Tue, 28 Oct 2014 21:21:17 -0400 + -- David Robillard Mon, 17 Nov 2014 01:44:25 -0500 suil (0.8.2) stable; diff --git a/src/instance.c b/src/instance.c index 06d6287..e5cf54d 100644 --- a/src/instance.c +++ b/src/instance.c @@ -114,6 +114,7 @@ open_wrapper(SuilHost* host, void* lib = dlopen(path, RTLD_NOW); if (!lib) { SUIL_ERRORF("Unable to open wrap module %s (%s)\n", path, dlerror()); + free(path); return NULL; } @@ -203,7 +204,7 @@ suil_instance_new(SuilHost* host, instance->descriptor = descriptor; // Make UI features array - instance->features = (LV2_Feature**)malloc(sizeof(LV2_Feature**)); + instance->features = (LV2_Feature**)malloc(sizeof(LV2_Feature*)); instance->features[0] = NULL; // Copy user provided features -- cgit v1.2.1