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@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Xiaojun Wang 2019-04-24 14:47:42 +08:00 committed by Jaegeuk Kim
parent c6968d44b9
commit 98e6f003d4

View File

@ -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);