summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-06-17 15:36:54 -0400
committerStephen Gallagher <sgallagh@redhat.com>2010-06-17 15:40:44 -0400
commite559171130fa3fab278bfbd592315b0d7315c94e (patch)
tree568904326f5202a5c8aaae3e555ec2af209bd91c
parent6a7b74548240c8076d6e75be5221272dfa80265d (diff)
downloadsssd-e559171130fa3fab278bfbd592315b0d7315c94e.tar.gz
sssd-e559171130fa3fab278bfbd592315b0d7315c94e.tar.xz
sssd-e559171130fa3fab278bfbd592315b0d7315c94e.zip
Initialize len before looping to read the pidfile
https://fedorahosted.org/sssd/ticket/544
-rw-r--r--src/util/server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/server.c b/src/util/server.c
index 8f5b44146..4b65da102 100644
--- a/src/util/server.c
+++ b/src/util/server.c
@@ -120,7 +120,7 @@ int pidfile(const char *path, const char *name)
pid_str[pidlen] = '\0';
-
+ len = 0;
while ((ret = read(fd, pid_str + len, pidlen - len)) != 0) {
if (ret == -1) {
if (errno == EINTR || errno == EAGAIN) {