mirror of
https://github.com/ceph/ceph
synced 2025-03-07 08:49:15 +00:00
test_librbd.cc: close va_list before return in error case
Fix for: [src/test/librbd/test_librbd.cc:322]: (error) va_list 'ap' was opened but not closed by va_end(). [src/test/librbd/test_librbd.cc:379]: (error) va_list 'ap' was opened but not closed by va_end(). Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This commit is contained in:
parent
cf85fb04bb
commit
699e869548
@ -322,6 +322,7 @@ int test_ls(rados_ioctx_t io_ctx, size_t num_expected, ...)
|
|||||||
image_names.erase(it);
|
image_names.erase(it);
|
||||||
} else {
|
} else {
|
||||||
ADD_FAILURE() << "Unable to find image " << expected;
|
ADD_FAILURE() << "Unable to find image " << expected;
|
||||||
|
va_end(ap);
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -379,6 +380,7 @@ int test_ls_pp(librbd::RBD& rbd, librados::IoCtx& io_ctx, size_t num_expected, .
|
|||||||
vector<string>::iterator listed_name = find(names.begin(), names.end(), string(expected));
|
vector<string>::iterator listed_name = find(names.begin(), names.end(), string(expected));
|
||||||
if (listed_name == names.end()) {
|
if (listed_name == names.end()) {
|
||||||
ADD_FAILURE() << "Unable to find image " << expected;
|
ADD_FAILURE() << "Unable to find image " << expected;
|
||||||
|
va_end(ap);
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
names.erase(listed_name);
|
names.erase(listed_name);
|
||||||
|
Loading…
Reference in New Issue
Block a user