From: Kevin Wolf <kwolf@redhat.com>
To: anthony@codemonkey.ws
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 1/6] sheepdog: check if '-o redundancy' is passed from user
Date: Fri, 13 Dec 2013 18:48:58 +0100 [thread overview]
Message-ID: <1386956943-19474-2-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1386956943-19474-1-git-send-email-kwolf@redhat.com>
From: Liu Yuan <namei.unix@gmail.com>
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>
---
block/sheepdog.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index b4ae50f..d1c812d 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -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++;
--
1.8.1.4
next prev parent reply other threads:[~2013-12-13 17:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-13 17:48 [Qemu-devel] [PULL 0/6] Block patches Kevin Wolf
2013-12-13 17:48 ` Kevin Wolf [this message]
2013-12-13 17:48 ` [Qemu-devel] [PULL 2/6] qapi-schema.json: Change 1.8 reference to 2.0 Kevin Wolf
2013-12-13 17:49 ` [Qemu-devel] [PULL 3/6] block/vvfat: Fix compiler warnings for OpenBSD Kevin Wolf
2013-12-13 17:49 ` [Qemu-devel] [PULL 4/6] block: expect get_block_status errors in bdrv_make_zero Kevin Wolf
2013-12-13 17:49 ` [Qemu-devel] [PULL 5/6] qemu-img: make progress output more accurate during convert Kevin Wolf
2013-12-13 17:49 ` [Qemu-devel] [PULL 6/6] blkdebug: Use QLIST_FOREACH_SAFE to resume IO Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1386956943-19474-2-git-send-email-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).