pagemap: init pagemap entries array as NULL
There is call to close_page_read on open_pages_image_at failure, also on failure of init_pagemaps. pmes[] is uninitialized here and free_pagemaps() will try to walk them and call xfree(). Which surely would lead to crash. pagemap.c:317:6: warning: Branch condition evaluates to a garbage value if (pr->pmes) ^~~~~~~~ Signed-off-by:Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
Showing
Please
register
or
sign in
to comment