lkml.org 
[lkml]   [2008]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch 9/9] fs/exec.c: fix a wrong goto path
On Mon, May 12, 2008 at 11:51:51AM +0800, WANG Cong wrote:
> On Sat, May 10, 2008 at 08:37:01PM +0100, Al Viro wrote:
> >On Thu, May 08, 2008 at 09:52:34PM +0800, WANG Cong wrote:
> >> When nameidata_to_filp() fails, I see no reasons to fall into 'out' path
> >> where doesn't free any resources at all.
> >
> >How about "nameidata_to_filp() frees on failure"?
>
> When it fails, it should free the resources that were allocated before it.
> That's to say, it should goto 'exit' on failure.
>
> Am I missing something obvious?

Yes. Take a look at the things dealt with at exit. Then look at what
nameidata_to_filp() does on failure.


\
 
 \ /
  Last update: 2008-05-12 06:01    [W:0.059 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site