Commit e34b5d2e by S.Çağlar Onur Committed by Serge Hallyn

bdev_copy segfaults if bdevtype is NULL

parent cd0bcc49
...@@ -1939,7 +1939,7 @@ struct bdev *bdev_copy(const char *src, const char *oldname, const char *cname, ...@@ -1939,7 +1939,7 @@ struct bdev *bdev_copy(const char *src, const char *oldname, const char *cname,
bdevtype = "overlayfs"; bdevtype = "overlayfs";
*needs_rdep = 0; *needs_rdep = 0;
if (strcmp(orig->type, "dir") == 0 && if (bdevtype && strcmp(orig->type, "dir") == 0 &&
strcmp(bdevtype, "overlayfs") == 0) strcmp(bdevtype, "overlayfs") == 0)
*needs_rdep = 1; *needs_rdep = 1;
......
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