Warning C28195

The function was declared as acquiring memory in a variable and exited without doing so

This warning indicates that the function prototype for the function being analyzed has a __drv_allocatesMem annotation. The __drv_allocatesMem annotation indicates that the function acquires memory in the designated result location, but in at least one path, the function didn't acquire the memory. The Code Analysis tool won't recognize the actual implementation of a memory allocator (involving address arithmetic) and won't recognize that memory is allocated (although many wrappers will be recognized). In this case, the Code Analysis tool doesn't recognize that the memory was allocated and issues this warning. To suppress the false positive, use a #pragma warning on the line that precedes the opening brace { of the function body