[lxc-devel] [PATCH] do not crash if specs is NULL
S.Çağlar Onur
caglar at 10ur.org
Thu Feb 27 19:16:05 UTC 2014
Signed-off-by: S.Çağlar Onur <caglar at 10ur.org>
---
src/lxc/bdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/bdev.c b/src/lxc/bdev.c
index 18f1770..627c09a 100644
--- a/src/lxc/bdev.c
+++ b/src/lxc/bdev.c
@@ -484,7 +484,7 @@ static int dir_destroy(struct bdev *orig)
static int dir_create(struct bdev *bdev, const char *dest, const char *n,
struct bdev_specs *specs)
{
- if (specs->dir)
+ if (specs && specs->dir)
bdev->src = strdup(specs->dir);
else
bdev->src = strdup(dest);
--
1.8.3.2
More information about the lxc-devel
mailing list