lkml.org 
[lkml]   [2003]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [2.5] memleak in load_elf_binary?
Oleg Drokin <green@namesys.com> wrote:
>
> Hello!
>
> I am still playing with improving memleak detector thing from smatch project.
>
> Seems there is a memleak in fs/binfmt_elf.c::load_elf_binary() in current 2.5
> If setup_arg_pages() fails (line 638 in my sources) we do return but
> not freeing possibly allocated elf_interpreter (line 520) and
> allocated elf_phdata (line 500) areas.
>
> Is this looking real? At least it looks real for me (I am trying to get
> number of false positives way down).
>

Yes, you're right. And there's a second one further down.

Whoever thought of permitting more than one `return' statement in a C
function should be shot.

This needs a little thought, as we've already set the new personality and the
old executable has been rubbed out.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.039 / U:3.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site