lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1106021035500.1913-100000@iolanthe.rowland.org>
Date:	Thu, 2 Jun 2011 10:53:04 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Julia Lawall <julia@...u.dk>
cc:	David Brownell <dbrownell@...rs.sourceforge.net>,
	<kernel-janitors@...r.kernel.org>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drivers/usb/gadget/inode.c: add missing kfree

On Thu, 2 Jun 2011, Julia Lawall wrote:

> From: Julia Lawall <julia@...u.dk>
> 
> The label fail frees dev->buf, but kbuf hasn't yet been stored there at
> this point.

...

> Signed-off-by: Julia Lawall <julia@...u.dk>
> 
> ---
> I wonder if it is really correct to free dev->buf at fail in this case.
> Because it is freeing the previously allocated value of dev->buf, not the
> current one as done in subsequent cases.

I don't think it matters.  This check is probably there only for 
safety; it should not be possible for dev->buf to be non-NULL at this 
point.  You ought to be able to remove the entire

	if (dev->buf)
		goto fail;

statement with no ill effects.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ