While I was investigating CID 1194192 related with a resource leak on mrp memory allocation, I could identify that actually we use this pointer on pci_emul.c as well as on vga.c source file. We use assert(3) on those files to make sure that the return value is 0.
I have reworked the logic here to make it more readable and also add a warn to explicit show the function where the memory allocation error could happen, also sort headers.
Also I will mark CID 1194192 as "Intentional".