Re: [PATCH v2 05/18] exec: Fix file_ram_alloc() error API violations

2019-12-04 Thread Philippe Mathieu-Daudé
On 12/4/19 10:36 AM, Markus Armbruster wrote: When os_mem_prealloc() fails, file_ram_alloc() calls qemu_ram_munmap() and returns null. Except it doesn't when its @errp argument is null, because it checks for failure with (errp && *errp). Introduced in commit 056b68af77 "fix qemu exit on memory

[PATCH v2 05/18] exec: Fix file_ram_alloc() error API violations

2019-12-04 Thread Markus Armbruster
When os_mem_prealloc() fails, file_ram_alloc() calls qemu_ram_munmap() and returns null. Except it doesn't when its @errp argument is null, because it checks for failure with (errp && *errp). Introduced in commit 056b68af77 "fix qemu exit on memory hotplug when allocation fails at prealloc