diff --git a/frontend/drivers/platform_darwin.m b/frontend/drivers/platform_darwin.m index b27c72d348..45d9c90c61 100644 --- a/frontend/drivers/platform_darwin.m +++ b/frontend/drivers/platform_darwin.m @@ -592,19 +592,19 @@ static int frontend_darwin_parse_drive_list(void *data) #if TARGET_OS_IPHONE #ifdef HAVE_MENU file_list_t *list = (file_list_t*)data; - CFURLRef bundle_url; - CFStringRef bundle_path; - char bundle_path_buf[PATH_MAX_LENGTH] = {0}; - char home_dir_buf[PATH_MAX_LENGTH] = {0}; - CFBundleRef bundle = CFBundleGetMainBundle(); - - bundle_url = CFBundleCopyBundleURL(bundle); - bundle_path = CFURLCopyPath(bundle_url); - - CFStringGetCString(bundle_path, bundle_path_buf, sizeof(bundle_path_buf), kCFStringEncodingUTF8); - (void)home_dir_buf; - - CFSearchPathForDirectoriesInDomains(CFDocumentDirectory, CFUserDomainMask, 1, home_dir_buf, sizeof(home_dir_buf)); + CFURLRef bundle_url; + CFStringRef bundle_path; + char bundle_path_buf[PATH_MAX_LENGTH] = {0}; + char home_dir_buf[PATH_MAX_LENGTH] = {0}; + CFBundleRef bundle = CFBundleGetMainBundle(); + + bundle_url = CFBundleCopyBundleURL(bundle); + bundle_path = CFURLCopyPath(bundle_url); + + CFStringGetCString(bundle_path, bundle_path_buf, sizeof(bundle_path_buf), kCFStringEncodingUTF8); + (void)home_dir_buf; + + CFSearchPathForDirectoriesInDomains(CFDocumentDirectory, CFUserDomainMask, 1, home_dir_buf, sizeof(home_dir_buf)); menu_list_push(list, home_dir_buf, "", MENU_FILE_DIRECTORY, 0, 0); @@ -612,7 +612,7 @@ static int frontend_darwin_parse_drive_list(void *data) MENU_FILE_DIRECTORY, 0, 0); ret = 0; - + CFRelease(bundle_path); CFRelease(bundle_url); #endif