From 98e6f003d46365001328e9bf1ab14af99f5b1b1a Mon Sep 17 00:00:00 2001 From: Xiaojun Wang Date: Wed, 24 Apr 2019 14:47:42 +0800 Subject: [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 Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- 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);