commit | c833ab7351f2ebac46740380a81e34482e208dcc | [log] [tgz] |
---|---|---|
author | Anthony Liguori <aliguori@us.ibm.com> | Fri May 22 08:17:55 2009 -0500 |
committer | Anthony Liguori <aliguori@us.ibm.com> | Fri May 22 10:50:29 2009 -0500 |
tree | 95676477087a9ce697fe01e349ccfbd6aad26888 | |
parent | 71b9b0ca5b29899042c5170692c468093fdb8af6 [diff] |
Fix segv when passing an unknown protocol Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
diff --git a/block.c b/block.c index 980fbec..cbc83b1 100644 --- a/block.c +++ b/block.c
@@ -306,7 +306,7 @@ 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);