cvs commit: src/lib/libc/stdio asprintf.c

Hiten Pandya hmp at
Mon Jun 7 11:00:56 PDT 2004

hmp         2004/06/07 10:59:42 PDT

DragonFly src repository

  Modified files:
    lib/libc/stdio       asprintf.c 
  Avoid a memory leak if vfprintf(3) by always calling va_end(3); this
  happens if vfprintf(3) runs out of memory.
  Move the va_start(3) closer to the vfprintf(3) call; free the buffer
  when if there is a failure condition and don't bother to realloc the
  buffer before returning it.
  Work done by Bruce Evans and Tim J. Robbins of the FreeBSD Project.
  Revision  Changes    Path
  1.4       +6 -5      src/lib/libc/stdio/asprintf.c

More information about the Commits mailing list