Memory leak
Posted: Tue Jul 25, 2017 7:58 pm
Hi, I found memory leak when use time out for httpdReadRequest:
patch:
api.c
Code: Select all
timeout.tv_sec = 0;
timeout.tv_usec = 100000;
request = httpdReadRequest(server, &timeout, &result);
api.c
Code: Select all
if (timeout != 0 && result == 0)
{
/* Timeout */
*status = 0;
free(request); // <-- add free
return(NULL);
}