]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/OSDMap.cc: fix potential null pointer deref
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 13 Oct 2017 21:56:52 +0000 (23:56 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 25 Oct 2017 16:14:05 +0000 (18:14 +0200)
commitbc7cf704587057dbb4967d167247bccb9d48dfe2
tree1cff648c511390fa4a14662bfdadaa8d8ee9b956
parentf764f258d61384a8018665a6c2031cc2fa67d39c
osd/OSDMap.cc: fix potential null pointer deref

Use the same logic as in OSDMap::pg_to_raw_up().

Fix for:

[src/osd/OSDMap.cc:2071] -> [src/osd/OSDMap.cc:2077]: (warning) Either the
 condition 'if(primary)' is redundant or there is possible null pointer
 dereference: primary.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/osd/OSDMap.cc