JasonRYu / mongoose

Automatically exported from code.google.com/p/mongoose
0 stars 0 forks source link

Leaking mg_connection objects #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. valgrind any mongoose instance
2. Send a few requests to it
3. Exit the server, look at the leaks

What is the expected output? What do you see instead?
Expect no leaks.  I see leaks.

What version of the product are you using? On what operating system?
2.5

Please provide any additional information below.
Add free(conn) to the bottom of close_connection

Original issue reported on code.google.com by caleb.ep...@gmail.com on 5 Mar 2009 at 7:20

GoogleCodeExporter commented 9 years ago
Patch for review:

@@ -3474,6 +3477,7 @@
        if (conn->sock != INVALID_SOCKET) {
                close_socket_gracefully(conn->sock);
        }
+        free (conn);
 }

Original comment by caleb.ep...@gmail.com on 5 Mar 2009 at 7:23

GoogleCodeExporter commented 9 years ago

Original comment by valenok on 5 Mar 2009 at 8:44