[sr-dev] git:mgw/free_faked_req: tm: fix memory leak in free_faked_req
Matthew Williams
matthew at flowroute.com
Fri Aug 9 01:43:23 CEST 2013
Module: sip-router
Branch: mgw/free_faked_req
Commit: f326b3070d8af8f84b3b9b077e029d43ec7f7000
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f326b3070d8af8f84b3b9b077e029d43ec7f7000
Author: Matthew Williams <mgwilliams at gmail.com>
Committer: Matthew Williams <mgwilliams at gmail.com>
Date: Thu Aug 8 16:43:08 2013 -0700
tm: fix memory leak in free_faked_req
---
modules/tm/t_reply.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/modules/tm/t_reply.c b/modules/tm/t_reply.c
index 97b813f..ce1301a 100644
--- a/modules/tm/t_reply.c
+++ b/modules/tm/t_reply.c
@@ -973,6 +973,11 @@ void free_faked_req(struct sip_msg *faked_req, struct cell *t)
faked_req->dst_uri.s = 0;
}
+ if (faked_req->path_vec.s) {
+ pkg_free(faked_req->path_vec.s);
+ faked_req->path_vec.len=0;
+ }
+
/* free all types of lump that were added in failure handlers */
del_nonshm_lump( &(faked_req->add_rm) );
del_nonshm_lump( &(faked_req->body_lumps) );
More information about the sr-dev
mailing list