cleanup nicely

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@356 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.3.14
Jan Kneschke 2005-05-23 13:43:01 +00:00
parent f88ca6b629
commit 3eaaf78038
1 changed files with 14 additions and 3 deletions

View File

@ -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);