Merge pull request #4621 from alexanderkyte/strdup_env
[mono.git] / mono / mini / mini.c
index e5503e27d34eda01528da1feeb022e497edfc0d5..efe23ea8f63c35d5abf5b2bfd3a1816bc5e18b88 100644 (file)
@@ -3114,7 +3114,7 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFl
        gboolean llvm = (flags & JIT_FLAG_LLVM) ? 1 : 0;
 #endif
        static gboolean verbose_method_inited;
-       static const char *verbose_method_name;
+       static char *verbose_method_name;
 
        InterlockedIncrement (&mono_jit_stats.methods_compiled);
        if (mono_profiler_get_events () & MONO_PROFILE_JIT_COMPILATION)
@@ -3406,6 +3406,7 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFl
                        if (strcmp (cfg->method->name, name) == 0)
                                cfg->verbose_level = 4;
                }
+               g_free (verbose_method_name);
        }
 
        cfg->intvars = (guint16 *)mono_mempool_alloc0 (cfg->mempool, sizeof (guint16) * STACK_MAX * header->max_stack);