diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2012-02-27 01:19:23 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2012-08-23 14:37:18 +0200 |
commit | b1640df5e6375926df0cc0e8dab217b21b23ce57 (patch) | |
tree | f5f11c9a90d4fee87a7309507b9df8a038db7aaa /tools | |
parent | b9ae22d758e6b5eed62774f5b2a71b87d818087e (diff) | |
download | lvm2-b1640df5e6375926df0cc0e8dab217b21b23ce57.tar.gz lvm2-b1640df5e6375926df0cc0e8dab217b21b23ce57.tar.xz lvm2-b1640df5e6375926df0cc0e8dab217b21b23ce57.zip |
dmsetup: check if new_name is non NULL
Diffstat (limited to 'tools')
-rw-r--r-- | tools/dmsetup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/dmsetup.c b/tools/dmsetup.c index ca1087da..7d1f2a13 100644 --- a/tools/dmsetup.c +++ b/tools/dmsetup.c @@ -719,7 +719,7 @@ static int _do_rename(const char *name, const char *new_name, const char *new_uu if (new_uuid) { if (!dm_task_set_newuuid(dmt, new_uuid)) goto out; - } else if (!dm_task_set_newname(dmt, new_name)) + } else if (!new_name || !dm_task_set_newname(dmt, new_name)) goto out; if (_switches[NOOPENCOUNT_ARG] && !dm_task_no_open_count(dmt)) |