Module: kamailio
Branch: master
Commit: 06e265b38a857789b64ca1370db039eeca5a0e50
URL:
https://github.com/kamailio/kamailio/commit/06e265b38a857789b64ca1370db039e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-04-22T09:36:31+02:00
ims_diameter_server: removed goto label used in single place
---
Modified: src/modules/ims_diameter_server/ims_diameter_server.c
---
Diff:
https://github.com/kamailio/kamailio/commit/06e265b38a857789b64ca1370db039e…
Patch:
https://github.com/kamailio/kamailio/commit/06e265b38a857789b64ca1370db039e…
---
diff --git a/src/modules/ims_diameter_server/ims_diameter_server.c
b/src/modules/ims_diameter_server/ims_diameter_server.c
index 2270a62560..3ee51601ec 100644
--- a/src/modules/ims_diameter_server/ims_diameter_server.c
+++ b/src/modules/ims_diameter_server/ims_diameter_server.c
@@ -286,7 +286,10 @@ int ki_diameter_request(struct sip_msg * msg, str* s_peer, int
i_appid, int i_co
session = 0;
}
- if (!req) goto error1;
+ if (!req) {
+ LM_ERR("Error occurred trying to send request\n");
+ return -1;
+ }
if (!addAVPsfromJSON(req, s_message)) {
LM_ERR("Failed to parse JSON Request\n");
@@ -325,12 +328,6 @@ int ki_diameter_request(struct sip_msg * msg, str* s_peer, int
i_appid, int i_co
}
}
}
-error1:
- //Only free UAR IFF it has not been passed to CDP
- if (req) cdpb.AAAFreeMessage(&req);
- LM_ERR("Error occurred trying to send request\n");
- return -1;
-
}
int diameter_request(struct sip_msg * msg, char* peer, char* appid, char* commandcode,
char* message, int async) {