This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: vasprintf


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]