diff options
-rw-r--r-- | common/JackControlAPI.cpp | 5 | ||||
-rw-r--r-- | common/wscript | 2 | ||||
-rw-r--r-- | linux/dbus/controller.c | 10 |
3 files changed, 11 insertions, 6 deletions
diff --git a/common/JackControlAPI.cpp b/common/JackControlAPI.cpp index 44bdba95..31db84ff 100644 --- a/common/JackControlAPI.cpp +++ b/common/JackControlAPI.cpp @@ -743,10 +743,13 @@ EXPORT jackctl_server_t * jackctl_server_create() if (!jackctl_internals_load(server_ptr)) { - goto fail_free_parameters; + goto fail_free_drivers; } return server_ptr; + +fail_free_drivers: + jackctl_server_free_drivers(server_ptr); fail_free_parameters: jackctl_server_free_parameters(server_ptr); diff --git a/common/wscript b/common/wscript index a3e9cd7e..698668e0 100644 --- a/common/wscript +++ b/common/wscript @@ -96,7 +96,7 @@ def build(bld): ] includes.append('../linux') uselib.append('RT') - uselib.append('DL') + uselib.append('DL') if bld.env()['IS_MACOSX']: common_libsources += [ diff --git a/linux/dbus/controller.c b/linux/dbus/controller.c index d6d91dd2..47367ecc 100644 --- a/linux/dbus/controller.c +++ b/linux/dbus/controller.c @@ -298,7 +298,7 @@ jack_controller_create( if (controller_ptr->internal_names == NULL) { jack_error("Ran out of memory trying to allocate internals names array"); - goto fail_destroy_server; + goto fail_free_driver_names_array; } internal_name_target = controller_ptr->internal_names; @@ -320,17 +320,19 @@ jack_controller_create( &controller_ptr->dbus_descriptor)) { jack_error("Ran out of memory trying to register D-Bus object path"); - goto fail_free_names_array; + goto fail_free_internal_names_array; } jack_controller_settings_load(controller_ptr); return controller_ptr; -fail_free_names_array: - free(controller_ptr->driver_names); +fail_free_internal_names_array: free(controller_ptr->internal_names); +fail_free_driver_names_array: + free(controller_ptr->driver_names); + fail_destroy_server: jackctl_server_destroy(controller_ptr->server); |