[sr-dev] git:master:8cae623c: ims_ipsec_pcscf: fix non-close mnl_socket when a bind error

Henning Westerholt hw at skalatan.de
Thu Oct 31 16:25:58 CET 2019


Module: kamailio
Branch: master
Commit: 8cae623c7051d529d779c4bf072225c44154e403
URL: https://github.com/kamailio/kamailio/commit/8cae623c7051d529d779c4bf072225c44154e403

Author: Stanislav S. Litvinenko <litvinenko at protei.ru>
Committer: Henning Westerholt <hw at skalatan.de>
Date: 2019-10-31T16:25:52+01:00

ims_ipsec_pcscf: fix non-close mnl_socket when a bind error

---

Modified: src/modules/ims_ipsec_pcscf/ipsec.c

---

Diff:  https://github.com/kamailio/kamailio/commit/8cae623c7051d529d779c4bf072225c44154e403.diff
Patch: https://github.com/kamailio/kamailio/commit/8cae623c7051d529d779c4bf072225c44154e403.patch

---

diff --git a/src/modules/ims_ipsec_pcscf/ipsec.c b/src/modules/ims_ipsec_pcscf/ipsec.c
index 171d884151..5306af84ae 100644
--- a/src/modules/ims_ipsec_pcscf/ipsec.c
+++ b/src/modules/ims_ipsec_pcscf/ipsec.c
@@ -63,6 +63,7 @@ struct mnl_socket* init_mnl_socket()
 
     if(mnl_socket_bind(mnl_socket, 0, MNL_SOCKET_AUTOPID) < 0) {
         LM_ERR("Error binding a MNL socket\n");
+        close_mnl_socket(mnl_socket);
         return NULL;
     }
 




More information about the sr-dev mailing list