mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
Commit 3fec17d4bb introduced a bug where
an empty cdrom would cause target_path to be uninitialized. Initialize
target_path to NULL instead.
The other option here would have been to set target_path to NULL only
on the LIBXL_DISK_FORMAT_EMPTY path. That would potentially enable
the compiler to catch future uninitialized paths, rather than having
those paths (potentially) dereference a NULL pointer. But given that
a bunch of our compilers failed to catch *this* uninitialized path,
setting it to NULL at declaration seems the safer option for now.
Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>