1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

lib:util: Initialize pid

Found by covscan

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Andreas Schneider 2021-12-14 16:13:51 +01:00 committed by Jeremy Allison
parent 31b9208d83
commit 4e9a58f376

View File

@ -207,7 +207,7 @@ void pidfile_create(const char *piddir, const char *name)
{
size_t len = strlen(piddir) + strlen(name) + 6;
char pidFile[len];
pid_t pid;
pid_t pid = (pid_t)-1;
int ret, fd;
snprintf(pidFile, sizeof(pidFile), "%s/%s.pid", piddir, name);