diff options
author | Robin Gareus <robin@gareus.org> | 2014-04-14 15:21:29 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-04-14 15:21:29 +0200 |
commit | 09d5d7f26b3778c22806366ef97223b193eaa65b (patch) | |
tree | fa671db49a637169ee7d489c66f93d035eddda9c /libs/ardour/linux_vst_support.cc | |
parent | 15c5d12321c16932a00b849e25226e0c02bbef82 (diff) |
remove code intended for use with basename(), fix memory leak since g_path_get_basename() returns a newly allocated string.
Diffstat (limited to 'libs/ardour/linux_vst_support.cc')
-rw-r--r-- | libs/ardour/linux_vst_support.cc | 9 |
1 files changed, 2 insertions, 7 deletions
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); } |