DragonFly commits List (threaded) for 2004-06
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
cvs commit: src/lib/libc/stdio asprintf.c
hmp 2004/06/07 10:59:42 PDT
DragonFly src repository
Modified files:
lib/libc/stdio asprintf.c
Log:
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
http://www.dragonflybsd.org/cvsweb/src/lib/libc/stdio/asprintf.c.diff?r1=1.3&r2=1.4&f=u
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]