Module: kamailio
Branch: master
Commit: 41db985ebfcb691f2e20e689a83379e382ef6c03
URL:
https://github.com/kamailio/kamailio/commit/41db985ebfcb691f2e20e689a83379e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-06-22T15:32:30+02:00
evapi: free addr info in case of bind error
---
Modified: src/modules/evapi/evapi_dispatch.c
---
Diff:
https://github.com/kamailio/kamailio/commit/41db985ebfcb691f2e20e689a83379e…
Patch:
https://github.com/kamailio/kamailio/commit/41db985ebfcb691f2e20e689a83379e…
---
diff --git a/src/modules/evapi/evapi_dispatch.c b/src/modules/evapi/evapi_dispatch.c
index 4d253865e9..0f95291bad 100644
--- a/src/modules/evapi/evapi_dispatch.c
+++ b/src/modules/evapi/evapi_dispatch.c
@@ -694,6 +694,7 @@ int evapi_run_dispatcher(char *laddr, int lport)
if (bind(evapi_srv_sock, ai_res->ai_addr, ai_res->ai_addrlen) < 0) {
LM_ERR("cannot bind to local address and port [%s:%d]\n", laddr, lport);
close(evapi_srv_sock);
+ freeaddrinfo(ai_res);
return -1;
}
freeaddrinfo(ai_res);