Module: sip-router
Branch: master
Commit: 09ebe81a4ccb4346af778cc21c789b0db0e193d9
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=09ebe81…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Apr 21 21:41:59 2014 +0200
tm: clean contacts in case of failure in t_load_contacts()
---
modules/tm/t_serial.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/modules/tm/t_serial.c b/modules/tm/t_serial.c
index 817a303..8c9e131 100644
--- a/modules/tm/t_serial.c
+++ b/modules/tm/t_serial.c
@@ -309,6 +309,7 @@ int t_load_contacts(struct sip_msg* msg, char* key, char* value)
len = MAX_SOCKET_STR - 1;
if (socket2str(sock_buf, &len, curr->sock) < 0) {
LM_ERR("failed to convert socket to str\n");
+ free_contact_list(contacts);
return -1;
}
sock_buf[len] = 0;