This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/2077] memory leak in libio/iofdopen.c
- From: "jakub at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 21 Dec 2005 10:35:25 -0000
- Subject: [Bug libc/2077] memory leak in libio/iofdopen.c
- References: <20051221101730.2077.heiko.nardmann@secunet.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From jakub at redhat dot com 2005-12-21 10:35 -------
Then your assumption is wrong:
struct locked_FILE
{
struct _IO_FILE_plus fp;
#ifdef _IO_MTSAFE_IO
_IO_lock_t lock;
#endif
struct _IO_wide_data wd;
} *new_f;
struct _IO_FILE_plus
{
_IO_FILE file;
const struct _IO_jump_t *vtable;
};
As you can see, &new_f->fp.file; is the same as (_IO_FILE *) new_f.
Even if it was some struct in the middle of the outer struct, you could still
using offsetof get back to the original malloced pointer.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
http://sourceware.org/bugzilla/show_bug.cgi?id=2077
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.