]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/kv_store_bench.cc: fix coverity REVERSE_INULL
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 18 Sep 2014 11:28:47 +0000 (13:28 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 19 Sep 2014 16:32:00 +0000 (18:32 +0200)
CID 1021214 (#1 of 1): Dereference before null check (REVERSE_INULL)
 check_after_deref: Null-checking cb_args suggests that it may be
 null, but it has already been dereferenced on all paths leading to
 the check.

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

index 698105c9f39b4a99911b411993dc1ac5f5d4eddc..790e5695fcb0114cd3300baca3e04b9f0ee4fa63 100644 (file)
@@ -420,9 +420,7 @@ int KvStoreBench::test_teuthology_aio(next_gen_t distr,
       break;
     }
 
-    if (cb_args) {
-      delete cb_args;
-    }
+    delete cb_args;
   }
 
   while(ops_in_flight > 0) {