This fixes a potential crash if we call MEM_guarded_printmemlist_stats before any allocations have occurred. (repro'd locally)
This fixes a potential nullptr deref if the CRTs malloc returns null.
This caught my attention after looking at static analysis warnings generated by Visual Studio 2019. Here are the warnings that are fixed with this.
Warning C6386 Buffer overrun while writing to 'printblock': the writable size is 'sizeof(MemPrintBlock)*totblock' bytes, but '24' bytes might be written. bf_intern_guardedalloc D:\PROJECTS\BLENDER\SOURCE\INTERN\GUARDEDALLOC\INTERN\MALLOCN_GUARDED_IMPL.C 787
Warning C6387 'printblock' could be '0': this does not adhere to the specification for the function 'qsort'. bf_intern_guardedalloc D:\PROJECTS\BLENDER\SOURCE\INTERN\GUARDEDALLOC\INTERN\MALLOCN_GUARDED_IMPL.C 787
Warning C6011 Dereferencing NULL pointer 'pb'. See line 787 for an earlier location where this can occur bf_intern_guardedalloc D:\PROJECTS\BLENDER\SOURCE\INTERN\GUARDEDALLOC\INTERN\MALLOCN_GUARDED_IMPL.C 793