From: Xiaojun Wang <wangxiaojun11@huawei.com> To: <linux-kernel@vger.kernel.org>, <linux-f2fs-devel@lists.sourceforge.net> Cc: <wangxiaojun11@huawei.com> Subject: [f2fs-dev] [PATCH] f2fs-tools:fix memory leak in write dquot Date: Wed, 24 Apr 2019 14:47:42 +0800 [thread overview] Message-ID: <1556088462-21693-1-git-send-email-wangxiaojun11@huawei.com> (raw) 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
WARNING: multiple messages have this Message-ID (diff)
From: Xiaojun Wang <wangxiaojun11@huawei.com> To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: wangxiaojun11@huawei.com Subject: [f2fs-dev] [PATCH] f2fs-tools:fix memory leak in write dquot Date: Wed, 24 Apr 2019 14:47:42 +0800 [thread overview] Message-ID: <1556088462-21693-1-git-send-email-wangxiaojun11@huawei.com> (raw) 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
next reply other threads:[~2019-04-24 6:43 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-04-24 6:47 Xiaojun Wang [this message] 2019-04-24 6:47 ` [f2fs-dev] [PATCH] f2fs-tools:fix memory leak in write dquot Xiaojun Wang 2019-04-24 15:06 ` Chao Yu
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1556088462-21693-1-git-send-email-wangxiaojun11@huawei.com \ --to=wangxiaojun11@huawei.com \ --cc=linux-f2fs-devel@lists.sourceforge.net \ --cc=linux-kernel@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.