[lxc-devel] [PATCH] fix getline(3) memory leaks
Serge Hallyn
serge.hallyn at ubuntu.com
Wed May 22 13:34:40 UTC 2013
Quoting Christian Seiler (christian at iwakd.de):
> Hi there,
>
> > Yeah I've tested before (because I used to want to think glibc would
> > check for that) and it definately segvs. I'll push this patch with
> > that added.
>
> I'm a bit confused, this goes against everything I know about C memory
> management:
It surprised me as well at the time,
> ANSI C (ANSI X3J11/88-090, May 13, 1988) [1], Section 4.10.3.2:
>
> If ptr is a null pointer, no action occurs.
and I didn't go back to check that. That's enough to make me
feel confident removing it.
Meanwhile, HUH. retrying, I don't get segv. I don't recall which
toolchain I tried that under.
So we can reverse that, thanks.
-serge
More information about the lxc-devel
mailing list