[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1556088462-21693-1-git-send-email-wangxiaojun11@huawei.com>
Date: Wed, 24 Apr 2019 14:47:42 +0800
From: Xiaojun Wang <wangxiaojun11@...wei.com>
To: <linux-kernel@...r.kernel.org>,
<linux-f2fs-devel@...ts.sourceforge.net>
CC: <wangxiaojun11@...wei.com>
Subject: [f2fs-dev] [PATCH] f2fs-tools:fix memory leak in write dquot
this patch free ddquot in qtree_write_dquot to avoid memory leak
Signed-off-by: Xiaojun Wang <wangxiaojun11@...wei.com>
---
fsck/quotaio_tree.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fsck/quotaio_tree.c b/fsck/quotaio_tree.c
index ebee862..de25a60 100644
--- a/fsck/quotaio_tree.c
+++ b/fsck/quotaio_tree.c
@@ -353,6 +353,7 @@ int qtree_write_dquot(struct dquot *dquot)
if (ret != info->dqi_entry_size) {
log_err("Quota write failed (id %u): %s",
(unsigned int)dquot->dq_id, strerror(errno));
+ quota_free_mem(&ddquot);
return ret;
}
quota_free_mem(&ddquot);
--
2.7.4
Powered by blists - more mailing lists