mirror of https://github.com/xemu-project/xemu.git
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
|
@ -1666,9 +1666,11 @@ static int sd_create(const char *filename, QEMUOptionParameter *options,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
} else if (!strcmp(options->name, BLOCK_OPT_REDUNDANCY)) {
|
} else if (!strcmp(options->name, BLOCK_OPT_REDUNDANCY)) {
|
||||||
ret = parse_redundancy(s, options->value.s);
|
if (options->value.s) {
|
||||||
if (ret < 0) {
|
ret = parse_redundancy(s, options->value.s);
|
||||||
goto out;
|
if (ret < 0) {
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
options++;
|
options++;
|
||||||
|
|
Loading…
Reference in New Issue