diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2009-05-22 08:17:55 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-05-22 10:50:29 -0500 |
commit | c833ab7351f2ebac46740380a81e34482e208dcc (patch) | |
tree | 95676477087a9ce697fe01e349ccfbd6aad26888 /block.c | |
parent | 71b9b0ca5b29899042c5170692c468093fdb8af6 (diff) | |
download | qemu-c833ab7351f2ebac46740380a81e34482e208dcc.zip qemu-c833ab7351f2ebac46740380a81e34482e208dcc.tar.gz qemu-c833ab7351f2ebac46740380a81e34482e208dcc.tar.bz2 |
Fix segv when passing an unknown protocol
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'block.c')
-rw-r--r-- | block.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |