]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test_cls_rbd.cc: use 'delete []' if 'new char[len]' was used
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Sun, 11 May 2014 22:05:15 +0000 (00:05 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Sun, 11 May 2014 22:06:43 +0000 (00:06 +0200)
Fix for:
[src/test/cls_rbd/test_cls_rbd.cc:82]: (error) Mismatching allocation
 and deallocation: b
[src/test/cls_rbd/test_cls_rbd.cc:95]: (error) Mismatching allocation
 and deallocation: b
[src/test/cls_rbd/test_cls_rbd.cc:97]: (error) Mismatching allocation
 and deallocation: b

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/test/cls_rbd/test_cls_rbd.cc

index 48cfb33a9e1c5b14f9b1f1768313475a6c8f904d..29e8c632751f9ca857dce46d14db706e2f4749bd 100644 (file)
@@ -79,7 +79,7 @@ TEST(cls_rbd, copyup)
   size_t l = 4 << 20;
   char *b = random_buf(l);
   inbl.append(b, l);
-  delete b;
+  delete [] b;
   ASSERT_EQ(l, inbl.length());
 
   // copyup to nonexistent object should create new object
@@ -94,7 +94,7 @@ TEST(cls_rbd, copyup)
   bufferlist inbl2;
   b = random_buf(l);
   inbl2.append(b, l);
-  delete b;
+  delete [] b;
   ASSERT_EQ(l, inbl2.length());
 
   // should still succeed