commit | cf4fb036a47042c86c9e3138ef01a6136fd5db87 | [log] [tgz] |
---|---|---|
author | Dragan Dosen <ddosen@haproxy.com> | Wed Nov 04 23:03:26 2015 +0100 |
committer | Willy Tarreau <w@1wt.eu> | Thu Nov 05 10:39:09 2015 +0100 |
tree | 0eef7a9142eaf309cb635ce93e8f05f489d9d213 | |
parent | e9544935e86278dfa3d49fb4b97b860774730625 [diff] |
BUG/MINOR: server: check return value of fgets() in apply_server_state() fgets() can return NULL on error or when EOF occurs. This patch adds a check of fgets() return value and displays a warning if the first line of the server state file can not be read. Additionally, we make sure to close the previously opened file descriptor.