From: Aleksey Kliger (λgeek) Date: Sat, 5 Nov 2016 01:02:23 +0000 (-0400) Subject: [mkbundle] Don't free bundled dylibrary directory (#3897) X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mono.git;a=commitdiff_plain;h=bf95567e69496ada5f4c2cc77ca28e4c44b2fb55 [mkbundle] Don't free bundled dylibrary directory (#3897) mkdtemp modifies the template in-place, don't free it. --- diff --git a/mono/mini/main.c b/mono/mini/main.c index 80044897a83..77f8bc9578c 100644 --- a/mono/mini/main.c +++ b/mono/mini/main.c @@ -151,7 +151,7 @@ bundle_save_library_initialize () bundle_save_library_initialized = 1; char *path = g_build_filename (g_get_tmp_dir (), "mono-bundle-XXXXXX", NULL); bundled_dylibrary_directory = g_mkdtemp (path); - g_free (path); + /* don't free path - mkdtemp modifies it in place, and bundled_dylibrary_directory is an alias of it */ if (bundled_dylibrary_directory == NULL) return; atexit (delete_bundled_libraries);