From: Alexander Indenbaum Date: Sat, 21 Feb 2026 19:13:50 +0000 (+0200) Subject: common: fix uninitialized nref in crimson CephContext X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F67453%2Fhead;p=ceph.git common: fix uninitialized nref in crimson CephContext Initialize nref(1) in the constructor so put() correctly releases the context. LeakSanitizer reports a leak. Signed-off-by: Alexander Indenbaum --- diff --git a/src/common/ceph_context.h b/src/common/ceph_context.h index fce8492ff67..a0e0cf9b526 100644 --- a/src/common/ceph_context.h +++ b/src/common/ceph_context.h @@ -101,7 +101,7 @@ public: void put(); private: std::unique_ptr _crypto_random; - unsigned nref; + unsigned nref = 1; ceph::PluginRegistry* _plugin_registry; }; }