]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ObjectCacher: handle nullptr hole case
authorChristopher Hoffman <choffman@redhat.com>
Thu, 5 Sep 2024 17:36:45 +0000 (17:36 +0000)
committerChristopher Hoffman <choffman@redhat.com>
Wed, 5 Nov 2025 13:59:34 +0000 (13:59 +0000)
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
src/osdc/ObjectCacher.cc

index c10a2ffd1d62be15e76b73b40685cc750973fc63..003e38e89bd5dd9af5a9dc7a4f19a28171f581d3 100644 (file)
@@ -1405,7 +1405,14 @@ int ObjectCacher::readx(OSDRead *rd, ObjectSet *oset, Context *onfinish,
     trace.event("start");
   }
 
-  int r =_readx(rd, oset, onfinish, true, &trace, holes);
+  int r;
+  if (holes == nullptr) {
+      std::vector<ObjHole> holes2;
+      r =_readx(rd, oset, onfinish, true, &trace, &holes2);
+  } else {
+      r =_readx(rd, oset, onfinish, true, &trace, holes);
+  }
+
   if (r < 0) {
     trace.event("finish");
   }