diff options
| author | Drew DeVault <sir@cmpwn.com> | 2020-10-28 12:43:05 -0400 |
|---|---|---|
| committer | Drew DeVault <sir@cmpwn.com> | 2020-10-28 12:43:05 -0400 |
| commit | 077b96d3cc2267d571cb73d64286a0d5e897dd1a (patch) | |
| tree | a30b85c6e622ce55d6cae4c4366cfd3448da181e /src/config.c | |
| parent | becc4460b6a60fcf193156a3810117a3eaaac182 (diff) | |
| download | gmnisrv-077b96d3cc2267d571cb73d64286a0d5e897dd1a.tar.gz gmnisrv-077b96d3cc2267d571cb73d64286a0d5e897dd1a.tar.xz gmnisrv-077b96d3cc2267d571cb73d64286a0d5e897dd1a.zip | |
config: free more routing information on finish
Diffstat (limited to 'src/config.c')
| -rw-r--r-- | src/config.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c index dc2a07e..ad2a8ac 100644 --- a/src/config.c +++ b/src/config.c @@ -286,6 +286,7 @@ config_finish(struct gmnisrv_config *conf) free(bind); bind = next; } + struct gmnisrv_host *host = conf->hosts; while (host) { struct gmnisrv_host *next = host->next; @@ -293,12 +294,22 @@ config_finish(struct gmnisrv_config *conf) struct gmnisrv_route *route = host->routes; while (route) { + switch (route->routing) { + case ROUTE_PATH: + free(route->path); + break; + case ROUTE_REGEX: + assert(0); // TODO + } + struct gmnisrv_route *rnext = route->next; + free(route->spec); free(route->root); free(route->index); free(route); route = rnext; } + free(host); host = next; } |
