[PATCH] fix mem leak in gwlib/mime.c
"P. A. Bagyenda" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
We have a memory leak in gwlib/mime.c which the attached patch should fix. We replace the header field of the MIMEEntity object without first freeing it. P.
mime.diff
(application/octet-stream, 580 B)
Index: gwlib/mime.c
===================================================================
RCS file: /home/cvs/gateway/gwlib/mime.c,v
retrieving revision 1.23
diff -u -r1.23 mime.c
--- gwlib/mime.c 2 Jul 2008 14:31:47 -0000 1.23
+++ gwlib/mime.c 18 Jul 2008 23:38:19 -0000
@@ -346,6 +346,7 @@
* from our caller, then duplicate them and continue */
if (headers != NULL) {
/* duplicate existing headers */
+ http_destroy_headers(e->headers);
e->headers = http_header_duplicate(headers);
} else {
/* parse the headers out of the mime block */