diff --git a/src/test/librbd/test_librbd.cc b/src/test/librbd/test_librbd.cc index 39014f06aa5..abf7764727f 100644 --- a/src/test/librbd/test_librbd.cc +++ b/src/test/librbd/test_librbd.cc @@ -322,6 +322,7 @@ int test_ls(rados_ioctx_t io_ctx, size_t num_expected, ...) image_names.erase(it); } else { ADD_FAILURE() << "Unable to find image " << expected; + va_end(ap); return -ENOENT; } } @@ -379,6 +380,7 @@ int test_ls_pp(librbd::RBD& rbd, librados::IoCtx& io_ctx, size_t num_expected, . vector::iterator listed_name = find(names.begin(), names.end(), string(expected)); if (listed_name == names.end()) { ADD_FAILURE() << "Unable to find image " << expected; + va_end(ap); return -ENOENT; } names.erase(listed_name);