From: Jos Collin Date: Wed, 11 Apr 2018 05:43:51 +0000 (+0530) Subject: client: Fix the gid_count check X-Git-Tag: v12.2.6~157^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f307fb52bb92bb4e5e196f7ac005b62797b3d425;p=ceph.git client: Fix the gid_count check Make the right check for gid_count. Fixes: http://tracker.ceph.com/issues/23652 Signed-off-by: Jos Collin (cherry picked from commit 956d5501facc6a65903b0bad0d4b87c88139c787) --- diff --git a/src/client/UserPerm.h b/src/client/UserPerm.h index a2d6ccbe888d..55371772e64e 100644 --- a/src/client/UserPerm.h +++ b/src/client/UserPerm.h @@ -31,7 +31,7 @@ private: m_uid = b.m_uid; m_gid = b.m_gid; gid_count = b.gid_count; - if (gid_count) { + if (gid_count > 0) { gids = new gid_t[gid_count]; alloced_gids = true; for (int i = 0; i < gid_count; ++i) {