anv: fix incorrect realloc failure handling