mirror of
https://github.com/ceph/ceph
synced 2025-02-21 01:47:25 +00:00
Merge pull request #18790 from amitkumar50/cov-rbd-6
rbd: null check before pool_name use Reviewed-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
commit
d490872f27
@ -442,7 +442,7 @@ int get_pool_image_snapshot_names(const po::variables_map &vm,
|
||||
//Validate pool name while creating/renaming/copying/cloning/importing/etc
|
||||
if (spec_validation == SPEC_VALIDATION_FULL) {
|
||||
boost::regex pattern("^[^@/]+?$");
|
||||
if (!boost::regex_match (*pool_name, pattern)) {
|
||||
if ((pool_name != nullptr) && !boost::regex_match (*pool_name, pattern)) {
|
||||
std::cerr << "rbd: invalid pool name '" << *pool_name << "'" << std::endl;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user