mirror of
https://github.com/lxsang/ant-http
synced 2025-02-24 00:52:48 +01:00
fix free error
This commit is contained in:
parent
d0df213164
commit
88a85fb36a
@ -14,6 +14,9 @@ void accept_request(void* client)
|
|||||||
char path[1024];
|
char path[1024];
|
||||||
char* token;
|
char* token;
|
||||||
char *line;
|
char *line;
|
||||||
|
char* oldurl = NULL;
|
||||||
|
char* tmp = NULL;
|
||||||
|
dictionary rq = NULL;
|
||||||
size_t i, j;
|
size_t i, j;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
@ -55,12 +58,12 @@ void accept_request(void* client)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
char* oldurl = strdup(url);
|
oldurl = strdup(url);
|
||||||
char* tmp = strchr(oldurl,'?');
|
tmp = strchr(oldurl,'?');
|
||||||
if(tmp)
|
if(tmp)
|
||||||
*tmp = '\0';
|
*tmp = '\0';
|
||||||
|
|
||||||
dictionary rq = decode_request(client, method, url);
|
rq = decode_request(client, method, url);
|
||||||
if(rq == NULL)
|
if(rq == NULL)
|
||||||
{
|
{
|
||||||
badrequest(client);
|
badrequest(client);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user