Module: sip-router
Branch: master
Commit: 770434e87ec14b9662314e8a13d587f547e876cb
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=770434e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Apr 21 11:12:23 2014 +0200
tm: free struct contacts in case of error retrieving r-uri in t_load_contacts()
---
modules/tm/t_serial.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/modules/tm/t_serial.c b/modules/tm/t_serial.c
index 8fdfeaf..e8becef 100644
--- a/modules/tm/t_serial.c
+++ b/modules/tm/t_serial.c
@@ -197,10 +197,12 @@ int t_load_contacts(struct sip_msg* msg, char* key, char* value)
LM_ERR("no memory for contact info\n");
return -1;
}
+ memset(contact, 0, sizeof(struct contact));
if (ruri_is_new) {
ruri = GET_RURI(msg);
if (!ruri) {
+ free_contact_list(contacts);
LM_ERR("no Request-URI found\n");
return -1;
}