From 3eaaf78038d200fe5ba4a79199a659ef807b0cd1 Mon Sep 17 00:00:00 2001 From: Jan Kneschke Date: Mon, 23 May 2005 13:43:01 +0000 Subject: [PATCH] cleanup nicely git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@356 152afb58-edef-0310-8abb-c4023f1b3aa9 --- src/mod_redirect.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/mod_redirect.c b/src/mod_redirect.c index 5c5ecf25..7ad486ac 100644 --- a/src/mod_redirect.c +++ b/src/mod_redirect.c @@ -41,10 +41,21 @@ INIT_FUNC(mod_redirect_init) { FREE_FUNC(mod_redirect_free) { plugin_data *p = p_d; - UNUSED(srv); - if (!p) return HANDLER_GO_ON; - + + if (p->config_storage) { + size_t i; + for (i = 0; i < srv->config_context->used; i++) { + plugin_config *s = p->config_storage[i]; + + pcre_keyvalue_buffer_free(s->redirect); + + free(s); + } + free(p->config_storage); + } + + buffer_free(p->match_buf); buffer_free(p->location);