Add free_reversepath_list().

Michael
This commit is contained in:
Michael Adam 2009-12-06 23:04:05 +01:00
parent 3f1201c8b3
commit 2e6999df4a
2 changed files with 16 additions and 0 deletions

View File

@ -92,6 +92,21 @@ struct reversepath *reversepath_get (char *url, struct reversepath *reverse)
return NULL; return NULL;
} }
/**
* Free a reversepath list
*/
void free_reversepath_list (struct reversepath *reverse)
{
while (reverse) {
struct reversepath *tmp = reverse;
reverse = reverse->next;
safefree (tmp->url);
safefree (tmp->path);
safefree (tmp);
}
}
/* /*
* Rewrite the URL for reverse proxying. * Rewrite the URL for reverse proxying.
*/ */

View File

@ -35,6 +35,7 @@ extern void reversepath_add (const char *path, const char *url,
struct reversepath **reversepath_list); struct reversepath **reversepath_list);
extern struct reversepath *reversepath_get (char *url, extern struct reversepath *reversepath_get (char *url,
struct reversepath *reverse); struct reversepath *reverse);
void free_reversepath_list (struct reversepath *reverse);
extern char *reverse_rewrite_url (struct conn_s *connptr, extern char *reverse_rewrite_url (struct conn_s *connptr,
hashmap_t hashofheaders, char *url); hashmap_t hashofheaders, char *url);