mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-02 21:32:52 +00:00
sheepdog: check if '-o redundancy' is passed from user
This fix a segfault (that is caused by b3af018f3
) of following command:
$ qemu-img convert some_img sheepdog:some_img
Cc: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
47acdd63a3
commit
a3120deee5
1 changed files with 5 additions and 3 deletions
|
@ -1666,9 +1666,11 @@ static int sd_create(const char *filename, QEMUOptionParameter *options,
|
|||
goto out;
|
||||
}
|
||||
} else if (!strcmp(options->name, BLOCK_OPT_REDUNDANCY)) {
|
||||
ret = parse_redundancy(s, options->value.s);
|
||||
if (ret < 0) {
|
||||
goto out;
|
||||
if (options->value.s) {
|
||||
ret = parse_redundancy(s, options->value.s);
|
||||
if (ret < 0) {
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
}
|
||||
options++;
|
||||
|
|
Loading…
Reference in a new issue