summaryrefslogtreecommitdiff
path: root/profiles/health
diff options
context:
space:
mode:
Diffstat (limited to 'profiles/health')
-rw-r--r--profiles/health/hdp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/profiles/health/hdp.c b/profiles/health/hdp.c
index d256c9f09..4f90380f9 100644
--- a/profiles/health/hdp.c
+++ b/profiles/health/hdp.c
@@ -863,7 +863,10 @@ static gboolean serve_echo(GIOChannel *io_chan, GIOCondition cond,
chan->edata->echo_done = TRUE;
fd = g_io_channel_unix_get_fd(io_chan);
+
len = read(fd, buf, sizeof(buf));
+ if (len < 0)
+ goto fail;
if (send_echo_data(fd, buf, len) >= 0)
return TRUE;