This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: vasprintf
- From: RÃmi Denis-Courmont <remi at remlab dot net>
- To: Mark Richards <mark dot richards at massmicro dot com>
- Cc: libc-help at sourceware dot org
- Date: Thu, 06 Aug 2009 09:01:00 +0200
- Subject: Re: vasprintf
- References: <4A7A25BB.7010103@massmicro.com>
On Wed, 05 Aug 2009 20:37:15 -0400, Mark Richards
<mark.richards@massmicro.com> wrote:
> Tracking down some memory leaks and need expert voice/s on vasprintf...
The value of the pointer is undefined when (v)asprintf fails. You need to
check the return value, which will be -1.
--
RÃmi Denis-Courmont