Module: kamailio
Branch: 5.2
Commit: 1ccb215b96f3dc0bd49ea3feb00f9e8f1a5c1fda
URL:
https://github.com/kamailio/kamailio/commit/1ccb215b96f3dc0bd49ea3feb00f9e8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-10-07T11:43:55+02:00
xmlrpc: clean allocated buffer for reply when no more memory for reason value
(cherry picked from commit 36a4b16117d79f1a30a9f929350f75ab8bfd5d2a)
(cherry picked from commit aa875e297bea05828f319d71fc68c44969931231)
---
Modified: src/modules/xmlrpc/xmlrpc.c
---
Diff:
https://github.com/kamailio/kamailio/commit/1ccb215b96f3dc0bd49ea3feb00f9e8…
Patch:
https://github.com/kamailio/kamailio/commit/1ccb215b96f3dc0bd49ea3feb00f9e8…
---
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) {