[sgen] Don't return a pointer from the out-of-memory function.
[mono.git] / mono / metadata / sgen-alloc.c
index 6e2240430d60b76eb598fa77b4b3babec36ee8cb..dd3a74c6df557c1282090322984ec64f6b91a8c6 100644 (file)
@@ -457,7 +457,7 @@ sgen_alloc_obj (GCVTable *vtable, size_t size)
        res = sgen_alloc_obj_nolock ((GCVTable*)vtable, size);
        UNLOCK_GC;
        if (G_UNLIKELY (!res))
-               return sgen_client_out_of_memory (size);
+               sgen_client_out_of_memory (size);
        return res;
 }