All of lore.kernel.org
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH] f2fs-tools:fix memory leak in write dquot
@ 2019-04-24  6:47 ` Xiaojun Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Xiaojun Wang @ 2019-04-24  6:47 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel; +Cc: wangxiaojun11

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [f2fs-dev] [PATCH] f2fs-tools:fix memory leak in write dquot
@ 2019-04-24  6:47 ` Xiaojun Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Xiaojun Wang @ 2019-04-24  6:47 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel; +Cc: wangxiaojun11

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs-tools:fix memory leak in write dquot
  2019-04-24  6:47 ` Xiaojun Wang
  (?)
@ 2019-04-24 15:06 ` Chao Yu
  -1 siblings, 0 replies; 3+ messages in thread
From: Chao Yu @ 2019-04-24 15:06 UTC (permalink / raw)
  To: Xiaojun Wang, linux-kernel, linux-f2fs-devel

On 2019-4-24 14:47, Xiaojun Wang wrote:
> this patch free ddquot in qtree_write_dquot to avoid memory leak
> 
> Signed-off-by: Xiaojun Wang <wangxiaojun11@huawei.com>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-24 15:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-24  6:47 [f2fs-dev] [PATCH] f2fs-tools:fix memory leak in write dquot Xiaojun Wang
2019-04-24  6:47 ` Xiaojun Wang
2019-04-24 15:06 ` Chao Yu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.