]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon/OSDMonitor: avoid null dereference if stats are not available 44698/head
authorJosh Durgin <jdurgin@redhat.com>
Fri, 7 Jan 2022 18:37:13 +0000 (13:37 -0500)
committerCory Snyder <csnyder@iland.com>
Thu, 20 Jan 2022 18:44:38 +0000 (13:44 -0500)
commit1ec9c49d320ecf2ab415af904a89f13f8a61b612
treea1b23c3e9b21db988d293892695090234ae92cce
parent0e3dc68d5dce47b939bb9691d7d1c86a3b1651b1
mon/OSDMonitor: avoid null dereference if stats are not available

Not confirmed yet whether this was the issue in the bug referenced
below, however it's a necessary defensive check for the
'osd pool get-quota' command.

All other uses of get_pool_stats() already handle this case.

Related-to: https://tracker.ceph.com/issues/53740
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
(cherry picked from commit 9c8392be33a574f15bc35b8f49e319af50d99e90)
src/mon/OSDMonitor.cc