mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-15 21:26:57 +00:00
bdev_copy segfaults if bdevtype is NULL
Signed-off-by: S.Çağlar Onur <caglar@10ur.org> Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
cd0bcc4958
commit
e34b5d2ef2
@ -1939,7 +1939,7 @@ struct bdev *bdev_copy(const char *src, const char *oldname, const char *cname,
|
||||
bdevtype = "overlayfs";
|
||||
|
||||
*needs_rdep = 0;
|
||||
if (strcmp(orig->type, "dir") == 0 &&
|
||||
if (bdevtype && strcmp(orig->type, "dir") == 0 &&
|
||||
strcmp(bdevtype, "overlayfs") == 0)
|
||||
*needs_rdep = 1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user