Page 1 of 1

Memory leak

Posted: Tue Jul 25, 2017 7:58 pm
by icetomcat
Hi, I found memory leak when use time out for httpdReadRequest:

Code: Select all

		timeout.tv_sec = 0;
		timeout.tv_usec = 100000;
		
		request = httpdReadRequest(server, &timeout, &result);
patch:
api.c

Code: Select all

		if (timeout != 0 && result == 0)
		{
			/* Timeout */
			*status = 0;
			free(request); // <-- add free
			return(NULL);
		}

Re: Memory leak

Posted: Wed Jul 26, 2017 12:21 am
by david
Hi icetomcat,

Thanks for the patch. That is indeed a memory leak. We've made that change in the source repo and will include it in the 2.1 code release.


Thanks

David
...