[jit] Don't allocate a new method in mono_get_method_constrained_checked, check the...
authorVladimir Kargov <kargov@gmail.com>
Thu, 8 Jun 2017 02:32:42 +0000 (19:32 -0700)
committerVladimir Kargov <kargov@gmail.com>
Mon, 17 Jul 2017 17:31:52 +0000 (10:31 -0700)
mono/metadata/loader.c

index e685ac227abfc4693a2fedb33903a57e6a56d574..61a6f94146588d2f175fdc83e83e760e0ea9c805 100644 (file)
@@ -1887,7 +1887,7 @@ mono_get_method_constrained_checked (MonoImage *image, guint32 token, MonoClass
 {
        error_init (error);
 
-       *cil_method = mono_get_method_from_token (image, token, NULL, context, NULL, error);
+       *cil_method = mono_get_method_checked (image, token, NULL, context, error);
        if (!*cil_method)
                return NULL;