db_cluster: free in case of error
authorDaniel-Constantin Mierla <miconda@gmail.com>
Fri, 21 Jul 2017 06:52:11 +0000 (08:52 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Fri, 21 Jul 2017 06:52:11 +0000 (08:52 +0200)
src/modules/db_cluster/dbcl_data.c

index 47f9444..66c3d30 100644 (file)
@@ -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));