libcollectdclient: Check if the file handle is valid before writing to it.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Mon, 2 Mar 2009 14:27:12 +0000 (15:27 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Mon, 2 Mar 2009 14:27:12 +0000 (15:27 +0100)
commit4c295efaa4044d56f6222186557d35aa165ef6db
tree8e11db907ff67733ae03b0776037df4f5b7993ca
parent6e419a825c50f9c97471aba7d50521bfc7e19828
libcollectdclient: Check if the file handle is valid before writing to it.

And free allocated memory when connecting fails. Only assign anything to
the user-provided pointer if `lcc_connect' succeeds. This should make
error-handling much more straight-forward.
src/libcollectdclient/client.c