Commit ead15156 by S.Çağlar Onur Committed by Stéphane Graber

bdev: do not crash if specs is NULL

parent 469b6a66
...@@ -484,7 +484,7 @@ static int dir_destroy(struct bdev *orig) ...@@ -484,7 +484,7 @@ static int dir_destroy(struct bdev *orig)
static int dir_create(struct bdev *bdev, const char *dest, const char *n, static int dir_create(struct bdev *bdev, const char *dest, const char *n,
struct bdev_specs *specs) struct bdev_specs *specs)
{ {
if (specs->dir) if (specs && specs->dir)
bdev->src = strdup(specs->dir); bdev->src = strdup(specs->dir);
else else
bdev->src = strdup(dest); bdev->src = strdup(dest);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment