diff --git a/libs/ardour/ardour/vst_types.h b/libs/ardour/ardour/vst_types.h index 1b443dc192..35b52435ab 100644 --- a/libs/ardour/ardour/vst_types.h +++ b/libs/ardour/ardour/vst_types.h @@ -62,7 +62,6 @@ struct LIBARDOUR_API _VSTHandle { void* dll; char* name; - char* nameptr; char* path; main_entry_t main_entry; diff --git a/libs/ardour/linux_vst_support.cc b/libs/ardour/linux_vst_support.cc index 35a51fa4f4..0d976d653b 100644 --- a/libs/ardour/linux_vst_support.cc +++ b/libs/ardour/linux_vst_support.cc @@ -210,8 +210,6 @@ vstfx_load (const char *path) buf = (char *)malloc(strlen(path) + 4); //The .so and a terminating zero sprintf (buf, "%s.so", path); - - fhandle->nameptr = strdup (path); } else @@ -219,8 +217,6 @@ vstfx_load (const char *path) /*We already have .so appened to the filename*/ buf = strdup(path); - - fhandle->nameptr = strdup (path); } /* get a name for the plugin based on the path: ye old VST problem where @@ -228,7 +224,7 @@ vstfx_load (const char *path) which we don't want to do at this point */ - fhandle->name = strdup (PBD::basename_nosuffix (fhandle->nameptr).c_str()); + fhandle->name = strdup (PBD::basename_nosuffix (path).c_str()); /*call load_vstfx_library to actually load the .so into memory*/ @@ -290,9 +286,8 @@ vstfx_unload (VSTHandle* fhandle) fhandle->dll = 0; } - if (fhandle->nameptr) + if (fhandle->name) { - free (fhandle->nameptr); free (fhandle->name); } diff --git a/libs/fst/vstwin.c b/libs/fst/vstwin.c index 6537918a7f..a55d4e59aa 100644 --- a/libs/fst/vstwin.c +++ b/libs/fst/vstwin.c @@ -8,7 +8,6 @@ #include static UINT_PTR idle_timer_id = 0; -//extern char* basename(char *path); // #else /* linux + wine */ @@ -490,9 +489,8 @@ fst_load (const char *path) if ((strlen(path)) && (NULL != (fhandle = fst_handle_new ()))) { char* period; - fhandle->nameptr = strdup (path); fhandle->path = strdup (path); - fhandle->name = strdup (g_path_get_basename(fhandle->nameptr)); + fhandle->name = g_path_get_basename(path); if ((period = strrchr (fhandle->name, '.'))) { *period = '\0'; } @@ -541,9 +539,8 @@ fst_unload (VSTHandle** fhandle) (*fhandle)->path = NULL; } - if ((*fhandle)->nameptr) { - free ((*fhandle)->nameptr); - (*fhandle)->nameptr = NULL; + if ((*fhandle)->name) { + free ((*fhandle)->name); (*fhandle)->name = NULL; }