From c3d379429e9d63e573e6ef820895c44f778e6dd6 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 3 Sep 2015 21:57:56 -0400 Subject: [PATCH] test_cls_numops: fix iterator use CID 1322828 (#1 of 1): Wrapper object use after free (WRAPPER_ESCAPE) 28. use_after_free: Using invalidated internal representation of local it. CID 1322827 (#1 of 1): Wrapper object use after free (WRAPPER_ESCAPE) 25. use_after_free: Using invalidated internal representation of local it. CID 1322826 (#1 of 1): Wrapper object use after free (WRAPPER_ESCAPE) 31. use_after_free: Using invalidated internal representation of local it. CID 1322825 (#1 of 1): Wrapper object use after free (WRAPPER_ESCAPE) 31. use_after_free: Using invalidated internal representation of local it. Signed-off-by: Sage Weil --- src/test/cls_numops/test_cls_numops.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/cls_numops/test_cls_numops.cc b/src/test/cls_numops/test_cls_numops.cc index 8abf110581e0f..844caf993cf1d 100644 --- a/src/test/cls_numops/test_cls_numops.cc +++ b/src/test/cls_numops/test_cls_numops.cc @@ -77,7 +77,7 @@ TEST(ClsNumOps, Add) { ASSERT_EQ(0, ioctx.omap_get_vals_by_keys("myobject", keys, &omap)); - omap.find(key); + it = omap.find(key); ASSERT_NE(omap.end(), it); @@ -166,7 +166,7 @@ TEST(ClsNumOps, Sub) { ASSERT_EQ(0, ioctx.omap_get_vals_by_keys("myobject", keys, &omap)); - omap.find(key); + it = omap.find(key); ASSERT_NE(omap.end(), it); @@ -269,7 +269,7 @@ TEST(ClsNumOps, Mul) { ASSERT_EQ(0, ioctx.omap_get_vals_by_keys("myobject", keys, &omap)); - omap.find(key); + it = omap.find(key); ASSERT_NE(omap.end(), it); @@ -370,7 +370,7 @@ TEST(ClsNumOps, Div) { ASSERT_EQ(0, ioctx.omap_get_vals_by_keys("myobject", keys, &omap)); - omap.find(key); + it = omap.find(key); ASSERT_NE(omap.end(), it); -- 2.39.5