Commit e1ae0d0e authored by Michael Smith's avatar Michael Smith

Memory leaks. Lots of little ones.

svn path=/trunk/httpp/; revision=3275
parent 3379751e
......@@ -268,7 +268,7 @@ char *httpp_getvar(http_parser_t *parser, char *name)
return NULL;
}
void httpp_destroy(http_parser_t *parser)
void httpp_clear(http_parser_t *parser)
{
parser->req_type = httpp_req_none;
if (parser->uri)
......@@ -278,6 +278,12 @@ void httpp_destroy(http_parser_t *parser)
parser->vars = NULL;
}
void httpp_destroy(http_parser_t *parser)
{
httpp_clear(parser);
free(parser);
}
char *_lowercase(char *str)
{
long i;
......
......@@ -40,6 +40,7 @@ int httpp_parse(http_parser_t *parser, char *http_data, unsigned long len);
void httpp_setvar(http_parser_t *parser, char *name, char *value);
char *httpp_getvar(http_parser_t *parser, char *name);
void httpp_destroy(http_parser_t *parser);
void httpp_clear(http_parser_t *parser);
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment