buf = (char *)malloc(strlen(path) + 4); //The .so and a terminating zero
sprintf (buf, "%s.so", path);
-
- fhandle->nameptr = strdup (path);
}
else
/*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
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*/
fhandle->dll = 0;
}
- if (fhandle->nameptr)
+ if (fhandle->name)
{
- free (fhandle->nameptr);
free (fhandle->name);
}
if(fhandle == 0)
{
- vstfx_error( "** ERROR ** VSTFX : The handle was 0\n" );
- return 0;
+ vstfx_error( "** ERROR ** VSTFX : The handle was 0\n" );
+ free (vstfx);
+ return 0;
}
if ((vstfx->plugin = fhandle->main_entry (amc)) == 0)