From 7bd4b2207b2dc6ea69cf89c4403f948a0314e94f Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Fri, 18 Feb 2022 13:13:43 +0100 Subject: [PATCH] mxqkill: Add missing initialization If the -u option is not given, passwd will not be set in the args evaluation loop, yet we use `if (!passwd) {` later in the code. Initialze pointer. --- mxqkill.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mxqkill.c b/mxqkill.c index 7b0d25e4..65d1e96a 100644 --- a/mxqkill.c +++ b/mxqkill.c @@ -238,7 +238,7 @@ int main(int argc, char *argv[]) struct mxq_group group; uid_t ruid, euid, suid; - struct passwd *passwd; + struct passwd *passwd = NULL; int res;