From f307fb52bb92bb4e5e196f7ac005b62797b3d425 Mon Sep 17 00:00:00 2001 From: Jos Collin Date: Wed, 11 Apr 2018 11:13:51 +0530 Subject: [PATCH] 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) --- src/client/UserPerm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/UserPerm.h b/src/client/UserPerm.h index a2d6ccbe888d7..55371772e64ee 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) { -- 2.39.5