aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-07-06 10:46:50 +0000
committerOmar Polo <op@omarpolo.com>2021-07-06 10:46:50 +0000
commitef945cf4157bc8239c6da682a89ba60b11cc0e26 (patch)
treeb3c5fed5c93bd7751b2e50e0b8328d1a2db04a17
parent4aa1dd553a8919c61136f8ed7cc775017f628769 (diff)
reset fcgi array in free_config
otherwise path, port and/or prog could become an invalid pointer.
-rw-r--r--gmid.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gmid.c b/gmid.c
index 93e1895..224eb42 100644
--- a/gmid.c
+++ b/gmid.c
@@ -328,6 +328,12 @@ free_config(void)
free(fcgi[i].path);
free(fcgi[i].port);
free(fcgi[i].prog);
+
+ fcgi[i].path = NULL;
+ fcgi[i].port = NULL;
+ fcgi[i].prog = NULL;
+
+ fcgi[i].s = FCGI_OFF;
}
tls_free(ctx);