Suppressed VS analyzer warning

Reimplemented CheckAllocError() with macro, which contains a "return"
that will never be executed.