All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Van Hensbergen <ericvh@gmail.com>
To: Christoph Hellwig <hch@infradead.org>,
	ericvh@gmail.com, 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 15:15:31 -0500	[thread overview]
Message-ID: <a4e6962a05071413152e27a857@mail.gmail.com> (raw)
In-Reply-To: <20050714195458.GA22856@infradead.org>

Doh!  Good catch, I'll fix and resubmit - same goes for the formating issues.

On 7/14/05, Christoph Hellwig <hch@infradead.org> wrote:
> > @@ -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 ;-)
> 
>

  reply	other threads:[~2005-07-14 20:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-14 18:37 [PATCH 2.6.13-rc2-mm2 2/7] v9fs: VFS file, dentry, and directory operations (2.0.2) ericvh
2005-07-17 13:53 ` ericvh
2005-07-14 19:54 ` Christoph Hellwig
2005-07-14 20:15   ` Eric Van Hensbergen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-07-14 18:46 ericvh

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=a4e6962a05071413152e27a857@mail.gmail.com \
    --to=ericvh@gmail.com \
    --cc=akpm@osdl.org \
    --cc=hch@infradead.org \
    --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 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.