diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp index 42871e9746..5532e0091f 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp @@ -3634,7 +3634,7 @@ FileSearchPath VSTPluginFormat::getDefaultLocationsToSearch() CFUniquePtr relativePluginDir (CFBundleCopyBuiltInPlugInsURL (CFBundleGetMainBundle())); CFUniquePtr pluginDir (CFURLCopyAbsoluteURL (relativePluginDir.get())); - CFStringRef path = CFURLCopyFileSystemPath (pluginDir.get(), kCFURLPOSIXPathStyle); + CFUniquePtr path (CFURLCopyFileSystemPath (pluginDir.get(), kCFURLPOSIXPathStyle)); FileSearchPath retval (String (CFStringGetCStringPtr (path.get(), kCFStringEncodingUTF8))); return retval; #endif