connection: fix leaking FDs on buffer-overflow during read
authorDavid Herrmann <dh.herrmann@googlemail.com>
Thu, 11 Oct 2012 21:37:49 +0000 (23:37 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 15 Oct 2012 20:25:19 +0000 (16:25 -0400)
commita9dd3badb5ca24bed16b7ef9ae57088dbcb4a2e5
tree919af3e7c627d35472bc6f2d12636d82b481b1a3
parent0b399b8d68b92627525c01e787d0b98b169b604c
connection: fix leaking FDs on buffer-overflow during read

If we read more FDs than we have room for, we currently leak FDs because
we overwrite previous still pending FDs. Instead, we do now close incoming
FDs if the buffer is full and return EOVERFLOW.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/connection.c