summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/server.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/server.c b/src/util/server.c
index a9be4be1..10f43fcf 100644
--- a/src/util/server.c
+++ b/src/util/server.c
@@ -129,7 +129,9 @@ int pidfile(const char *path, const char *name)
len += ret;
if (len > pidlen) {
DEBUG(1, ("read too much, this should never happen.\n"));
- break;
+ close(fd);
+ talloc_free(file);
+ return EINVAL;
}
continue;
} else {