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