disk/core: Fix memory leakage in open all disks

Fix memory leakage in disk/core disk_image__open_all when malloc disk
failed, should free the disks that already malloced.

Signed-off-by: Lei Xiang <leixiang@kylinos.cn>
Suggested-by: Xie Ming <xieming@kylinos.cn>
Suggested-by: Alexandru Elisei <alexandru.elisei@arm.com>
Suggested-by: Will Deacon <will@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
1 file changed