[metadata] Guard access to mb->locals_list with DISABLE_JIT ifdef
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Sun, 10 Apr 2016 23:29:10 +0000 (01:29 +0200)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Sun, 10 Apr 2016 23:29:10 +0000 (01:29 +0200)
The field is only available when DISABLE_JIT is not defined.

mono/metadata/method-builder.c

index 4f6eb93ba60da7444c0b6b873b002bb1f5dd9dab..09e6027f4a0d53b7f5c2d50eed49cc7c59b1479b 100644 (file)
@@ -185,9 +185,11 @@ mono_mb_create_method (MonoMethodBuilder *mb, MonoMethodSignature *signature, in
 #endif
        }
 
+#ifndef DISABLE_JIT
        /* Free the locals list so mono_mb_free () doesn't free the types twice */
        g_list_free (mb->locals_list);
        mb->locals_list = NULL;
+#endif
 
        method->signature = signature;
        if (!signature->hasthis)