aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--src/spawn-fcgi.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 7a43fcd..5a8ffa6 100644
--- a/NEWS
+++ b/NEWS
@@ -15,3 +15,4 @@ NEWS
* Fix error handling for unix-socket-connect test
* Man page update
* Use header include order from 1.4.x
+ * Fix segfault due to uninitialized var
diff --git a/src/spawn-fcgi.c b/src/spawn-fcgi.c
index 3fc243f..02f32a1 100644
--- a/src/spawn-fcgi.c
+++ b/src/spawn-fcgi.c
@@ -276,8 +276,8 @@ static int fcgi_spawn_connection(char *appPath, char **appArgv, char *addr, unsi
static int find_user_group(const char *user, const char *group, uid_t *uid, gid_t *gid, const char **username) {
uid_t my_uid = 0;
gid_t my_gid = 0;
- struct passwd *my_pwd;
- struct group *my_grp;
+ struct passwd *my_pwd = NULL;
+ struct group *my_grp = NULL;
*uid = 0; *gid = 0;
if (username) *username = NULL;