summaryrefslogtreecommitdiff
path: root/source4/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source4/smbd')
-rw-r--r--source4/smbd/pidfile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/smbd/pidfile.c b/source4/smbd/pidfile.c
index b7d1c27cd0f..32d3964302e 100644
--- a/source4/smbd/pidfile.c
+++ b/source4/smbd/pidfile.c
@@ -57,6 +57,9 @@ pid_t pidfile_pid(const char *piddir, const char *name)
}
ret = (pid_t)atoi(pidstr);
+ if (ret <= 0) {
+ goto noproc;
+ }
if (!process_exists_by_pid(ret)) {
goto noproc;