From: Christoph Hellwig <hch@infradead.org>
To: ericvh@gmail.com
Cc: linux-kernel@vger.kernel.org,
v9fs-developer@lists.sourceforge.net, akpm@osdl.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2.6.13-rc2-mm2 2/7] v9fs: VFS file, dentry, and directory operations (2.0.2)
Date: Thu, 14 Jul 2005 20:54:58 +0100 [thread overview]
Message-ID: <20050714195458.GA22856@infradead.org> (raw)
In-Reply-To: <200507141830.j6EIUiRZ023607@ms-smtp-03-eri0.texas.rr.com>
> @@ -383,9 +379,10 @@ v9fs_file_write(struct file *filp, const
> return -ENOMEM;
>
> ret = copy_from_user(buffer, data, count);
> - if (ret)
> + if (ret) {
> dprintk(DEBUG_ERROR, "Problem copying from user\n");
> - else
> + return -EFAULT;
> + } else
> ret = v9fs_write(filp, buffer, count, offset);
>
> kfree(buffer);
Aren't you leaking buffer in the error case? Also we Linux people really
hate an else clause when the if block contains a return statement ;-)
next prev parent reply other threads:[~2005-07-14 19:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-17 13:53 [PATCH 2.6.13-rc2-mm2 2/7] v9fs: VFS file, dentry, and directory operations (2.0.2) ericvh
2005-07-14 19:54 ` Christoph Hellwig [this message]
2005-07-14 20:15 ` Eric Van Hensbergen
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=20050714195458.GA22856@infradead.org \
--to=hch@infradead.org \
--cc=akpm@osdl.org \
--cc=ericvh@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=v9fs-developer@lists.sourceforge.net \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox