From db32f9c6a32ab8aaa85cc43f2f3ab194a250dafa Mon Sep 17 00:00:00 2001 From: matt335672 <30179339+matt335672@users.noreply.github.com> Date: Sat, 1 Feb 2025 17:26:42 +0000 Subject: [PATCH] Coverity CID 468119 Add additional check to prevent Coverity assuming the worst --- sesman/chansrv/chansrv_xfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sesman/chansrv/chansrv_xfs.c b/sesman/chansrv/chansrv_xfs.c index 1be68daf..d90ab715 100644 --- a/sesman/chansrv/chansrv_xfs.c +++ b/sesman/chansrv/chansrv_xfs.c @@ -283,7 +283,9 @@ xfs_create_xfs_fs(mode_t umask, uid_t uid, gid_t gid) (xino1 = g_new0(XFS_INODE_ALL, 1)) == NULL || (xino2 = g_new0(XFS_INODE_ALL, 1)) == NULL || (xino1_name = strdup(".")) == NULL || - (xino2_name = strdup(".delete-pending")) == NULL) + (xino2_name = strdup(".delete-pending")) == NULL || + // This keeps Coverity happy (see below) + xfs->free_count < 3) { free(xino1); free(xino2);