From: Daniel Jacobowitz <drow@false.org>
To: Kris Warkentin <kewarken@qnx.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch] clean up potential memory leak in thread.c
Date: Mon, 03 Oct 2005 14:40:00 -0000 [thread overview]
Message-ID: <20051003144022.GA21326@nevyn.them.org> (raw)
In-Reply-To: <43414074.3010506@qnx.com>
On Mon, Oct 03, 2005 at 10:30:12AM -0400, Kris Warkentin wrote:
> We're throwing named thread support into the kernel so I'm keeping an
> arbitrary length string in there. Would never be a huge memory leak but
> I'm fussy that way.
You don't actually need this to add an arbitrary lenth string; the
target gets to malloc this, you can use a trailing char[1] or simply
malloc sizeof(struct) + strlen (char) + 1 and point the char* right
after the struct.
If it's clearer to do it this way, though, we can go with your patch.
If you'd rather do that let me know; IIRC there were some formatting
glitches.
--
Daniel Jacobowitz
CodeSourcery, LLC
next prev parent reply other threads:[~2005-10-03 14:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-29 17:16 Kris Warkentin
2005-10-02 20:19 ` Daniel Jacobowitz
2005-10-03 14:30 ` Kris Warkentin
2005-10-03 14:40 ` Daniel Jacobowitz [this message]
2005-10-03 15:15 ` Kris Warkentin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051003144022.GA21326@nevyn.them.org \
--to=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=kewarken@qnx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox