CID 727984 (#5 of 5): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable "cb_args" going out of scope leaks the storage
it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
kv = (((KvStoreBench *)this)->*distr)(true);
if (kv.first == "") {
i--;
+ delete cb_args;
continue;
}
ops_in_flight++;
kv = (((KvStoreBench *)this)->*distr)(false);
if (kv.first == "") {
i--;
+ delete cb_args;
continue;
}
ops_in_flight++;
kv = (((KvStoreBench *)this)->*distr)(false);
if (kv.first == "") {
i--;
+ delete cb_args;
continue;
}
key_set.erase(kv.first);
kv = (((KvStoreBench *)this)->*distr)(false);
if (kv.first == "") {
i--;
+ delete cb_args;
continue;
}
bufferlist val;
cb_args, &cb_args->err);
break;
}
+
+ if (cb_args) {
+ delete cb_args;
+ }
}
while(ops_in_flight > 0) {