[sr-dev] git:master: tm: clean contacts in case of failure in t_load_contacts()

Daniel-Constantin Mierla miconda at gmail.com
Mon Apr 21 22:00:24 CEST 2014


Module: sip-router
Branch: master
Commit: 09ebe81a4ccb4346af778cc21c789b0db0e193d9
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=09ebe81a4ccb4346af778cc21c789b0db0e193d9

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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;




More information about the sr-dev mailing list