summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/network.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/network.c b/src/network.c
index 61dcbae..9caef04 100644
--- a/src/network.c
+++ b/src/network.c
@@ -191,7 +191,11 @@ ssize_t readline (int fd, char **whole_buffer)
goto CLEANUP;
}
- recv (fd, line_ptr->data, diff, 0);
+ ret = recv (fd, line_ptr->data, diff, 0);
+ if (ret == -1) {
+ goto CLEANUP;
+ }
+
line_ptr->len = diff;
if (ptr) {