Module: kamailio
Branch: master
Commit: 36a4b16117d79f1a30a9f929350f75ab8bfd5d2a
URL:
https://github.com/kamailio/kamailio/commit/36a4b16117d79f1a30a9f929350f75a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-10-04T18:12:15+02:00
xmlrpc: clean allocated buffer for reply when no more memory for reason value
---
Modified: src/modules/xmlrpc/xmlrpc.c
---
Diff:
https://github.com/kamailio/kamailio/commit/36a4b16117d79f1a30a9f929350f75a…
Patch:
https://github.com/kamailio/kamailio/commit/36a4b16117d79f1a30a9f929350f75a…
---
diff --git a/src/modules/xmlrpc/xmlrpc.c b/src/modules/xmlrpc/xmlrpc.c
index 9521af2386..7552b4d7f1 100644
--- a/src/modules/xmlrpc/xmlrpc.c
+++ b/src/modules/xmlrpc/xmlrpc.c
@@ -2509,7 +2509,7 @@ static int ki_xmlrpc_reply(sip_msg_t* msg, int rcode, str* reason)
reply.reason = as_asciiz(reason);
if (reply.reason == NULL) {
ERR("No memory left\n");
- return -1;
+ goto error;
}
if (reply.code >= 300) {