mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
fix memory leak; found by Elliot F
svn:r378
This commit is contained in:
parent
5e0ac7f239
commit
b7ff0248c7
4
http.c
4
http.c
@ -641,8 +641,10 @@ evhttp_handle_chunked_read(struct evhttp_request *req, struct evbuffer *buf)
|
||||
if (p == NULL)
|
||||
break;
|
||||
/* the last chunk is on a new line? */
|
||||
if (strlen(p) == 0)
|
||||
if (strlen(p) == 0) {
|
||||
free(p);
|
||||
continue;
|
||||
}
|
||||
req->ntoread = strtol(p, &endp, 16);
|
||||
error = *p == '\0' || (*endp != '\0' && *endp != ' ');
|
||||
free(p);
|
||||
|
Loading…
x
Reference in New Issue
Block a user