diff --git a/vm/os-macosx.mm b/vm/os-macosx.mm index 2b855d4881..ee96bc2016 100644 --- a/vm/os-macosx.mm +++ b/vm/os-macosx.mm @@ -22,8 +22,9 @@ void early_init(void) { } } +/* You must free() this yourself. */ const char* vm_executable_path(void) { - return [[[NSBundle mainBundle] executablePath] UTF8String]; + return safe_strdup([[[NSBundle mainBundle] executablePath] UTF8String]); } const char* default_image_path(void) {