summaryrefslogtreecommitdiffstats
path: root/xlators/features/quota
diff options
context:
space:
mode:
authorXi Jinyu <xijinyu@cmss.chinamobile.com>2020-01-14 22:29:06 -0500
committerAmar Tumballi <amar@kadalu.io>2020-01-21 13:30:26 +0000
commit18549de12bcfafe4ac30fc2e11ad7a3f3c216b38 (patch)
tree63394ac12b3fc2ae7c17b9dca4e56801cfe25ab2 /xlators/features/quota
parent61737898e84d30e02117baa7431f89cafff27f56 (diff)
Fix possible resource leaks.
xlators/features/quota/src/quota.c quota_log_usage function. The quota_log_helper() function applies memory for path through inode_path(), should be GF_FREE(). fixes: bz#1792707 Change-Id: I33143bdf272bf10837061df4a1b7b2fc146162d5 Signed-off-by: Xi Jinyu <xijinyu@cmss.chinamobile.com>
Diffstat (limited to 'xlators/features/quota')
-rw-r--r--xlators/features/quota/src/quota.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index 34dac481a64..01b01b5f01b 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -4950,6 +4950,9 @@ quota_log_usage(xlator_t *this, quota_inode_ctx_t *ctx, inode_t *inode,
ctx->prev_log = cur_time;
}
+ if (path)
+ GF_FREE(path);
+
if (usage_str)
GF_FREE(usage_str);
}