]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r197752:
authordas <das@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 24 Jan 2010 20:15:59 +0000 (20:15 +0000)
committerdas <das@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 24 Jan 2010 20:15:59 +0000 (20:15 +0000)
commit16c4ebda9c5aff13f08e3c5bd7f15a7605f6417f
treeb315bd7e608ef1bccba8423652d2cdeffaad9aeb
parent91041f48b661f9c72bd1fdd753be114fd02b7157
MFC r197752:

  Better glibc compatibility for getline/getdelim:

  - Tolerate applications that pass a NULL pointer for the buffer and
    claim that the capacity of the buffer is nonzero.

  - If an application passes in a non-NULL buffer pointer and claims the
    buffer has zero capacity, we should free (well, realloc) it
    anyway. It could have been obtained from malloc(0), so failing to
    free it would be a small memory leak.

git-svn-id: svn://svn.freebsd.org/base/stable/8@202947 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libc/stdio/getdelim.c