sim-card
/
qemu
Archived
10
0
Fork 0

Fix segv when passing an unknown protocol

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Anthony Liguori 2009-05-22 08:17:55 -05:00
parent 71b9b0ca5b
commit c833ab7351
1 changed files with 1 additions and 1 deletions

View File

@ -306,7 +306,7 @@ static BlockDriver *find_image_format(const char *filename)
drv = find_protocol(filename);
/* no need to test disk image formats for vvfat */
if (strcmp(drv->format_name, "vvfat") == 0)
if (drv && strcmp(drv->format_name, "vvfat") == 0)
return drv;
ret = bdrv_file_open(&bs, filename, BDRV_O_RDONLY);