From: Christopher Hoffman Date: Thu, 5 Sep 2024 17:36:45 +0000 (+0000) Subject: ObjectCacher: handle nullptr hole case X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d208442eb955f42f41eb7f2cb95c09326acf8e79;p=ceph.git ObjectCacher: handle nullptr hole case Signed-off-by: Christopher Hoffman --- diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index c10a2ffd1d6..003e38e89bd 100644 --- a/src/osdc/ObjectCacher.cc +++ b/src/osdc/ObjectCacher.cc @@ -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 holes2; + r =_readx(rd, oset, onfinish, true, &trace, &holes2); + } else { + r =_readx(rd, oset, onfinish, true, &trace, holes); + } + if (r < 0) { trace.event("finish"); }