summaryrefslogtreecommitdiff
path: root/src
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:39:05 -0400
commitc892981d8272a02c44900d4c7b081da0bff6e4b3 (patch)
treefee356056b994934f5781500fc07f1c0416b9588 /src
parent564d213ea3f0957a3337cd0f1d63e766e16ce6d8 (diff)
downloadsssd-c892981d8272a02c44900d4c7b081da0bff6e4b3.tar.gz
sssd-c892981d8272a02c44900d4c7b081da0bff6e4b3.tar.bz2
sssd-c892981d8272a02c44900d4c7b081da0bff6e4b3.zip
Initialize len before looping to read the pidfile
https://fedorahosted.org/sssd/ticket/544
Diffstat (limited to 'src')
-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 8f5b4414..4b65da10 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) {