PATCH: fix memory leak

Nuno Ferreira <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization Graycell
Message-ID <[email protected]>
Hi,
attached is a patch that fixes a memory leak in the http module.
If you're using kannel under cygwin and are seeing handle leaks this
might be the cause because this was also leaking a mutex for every
request.

RCS file: /home/cvs/gateway/gwlib/http.c,v
retrieving revision 1.213
diff -u -w -b -r1.213 http.c
--- gwlib/http.c	2 Dec 2003 09:20:51 -0000	1.213
+++ gwlib/http.c	12 Jan 2004 17:01:31 -0000
@@ -1011,6 +1011,7 @@
                     http_status_class(trans->status) == HTTP_STATUS_PROVISIONAL) {
             /* This was a provisional reply; get the real one now. */
             trans->state = reading_status;
+            entity_destroy(trans->response);
         } else if (ret == 0) {
             trans->state = transaction_done;
 
--
Nuno
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.