]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/fio: handle nullptr when throttle params parsing 31681/head
authorIgor Fedotov <ifedotov@suse.com>
Fri, 15 Nov 2019 17:37:07 +0000 (20:37 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Fri, 15 Nov 2019 17:37:07 +0000 (20:37 +0300)
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
src/test/fio/fio_ceph_objectstore.cc

index aabf0c22e80090c89cf3e33d712ecbb06a83c475..ac0c79c99d515d9fbc024caf9f5f0ea460f09cc3 100644 (file)
@@ -487,7 +487,9 @@ struct Job {
 
   static vector<unsigned> parse_throttle_str(const char *p) {
     vector<unsigned> ret;
-
+    if (p == nullptr) {
+      return ret;
+    }
     ceph::for_each_substr(p, ",\"", [&ret] (auto &&s) mutable {
       if (s.size() > 0) {
        ret.push_back(std::stoul(std::string(s)));