Module: kamailio
Branch: master
Commit: cbc5502e23f58b50cb11124defe0b7ad618899b6
URL:
https://github.com/kamailio/kamailio/commit/cbc5502e23f58b50cb11124defe0b7a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-07-21T08:52:11+02:00
db_cluster: free in case of error
---
Modified: src/modules/db_cluster/dbcl_data.c
---
Diff:
https://github.com/kamailio/kamailio/commit/cbc5502e23f58b50cb11124defe0b7a…
Patch:
https://github.com/kamailio/kamailio/commit/cbc5502e23f58b50cb11124defe0b7a…
---
diff --git a/src/modules/db_cluster/dbcl_data.c b/src/modules/db_cluster/dbcl_data.c
index 47f9444d19..66c3d30e24 100644
--- a/src/modules/db_cluster/dbcl_data.c
+++ b/src/modules/db_cluster/dbcl_data.c
@@ -115,6 +115,7 @@ int dbcl_init_con(str *name, str *url)
if(sc->sinfo==NULL)
{
LM_ERR("no shm memory\n");
+ pkg_free(sc);
return -1;
}
memset(sc->sinfo, 0, sizeof(dbcl_shared_t));