lkml.org 
[lkml]   [2019]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[f2fs-dev] [PATCH] f2fs-tools:fix memory leak in write dquot
Date
this patch free ddquot in qtree_write_dquot to avoid memory leak

Signed-off-by: Xiaojun Wang <wangxiaojun11@huawei.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
\
 
 \ /
  Last update: 2019-04-24 08:44    [W:0.033 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site