#132 new
cfis (at savagexi)

Should Use xfree Not free

Reported by cfis (at savagexi) | May 5th, 2010 @ 08:17 PM

In thin.c:

void Thin_HttpParser_free(void *data) {
TRACE();

if(data) {

free(data);

} }

Use of free causes heap debug failures with instrumented VC builds. The problem is that memory must be allocated and deallocated using the same runtime library.

Thin asks Ruby to allocate the memory (line 233):

http_parser *hp = ALLOC_N(http_parser, 1);

Therefore thin should ask Ruby to deallocate the memory by using the xfree method the Ruby api provides.

More info available from http://msdn.microsoft.com/en-US/library/ms235460%28v=VS.80%29.aspx

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Tags

Pages