Module: kamailio
Branch: master
Commit: bddf16db74ea779bb01805fc2cbabfdaf8f4d62b
URL:
https://github.com/kamailio/kamailio/commit/bddf16db74ea779bb01805fc2cbabfd…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-08-02T17:08:49+02:00
db_text: free pointer in case of error
---
Modified: src/modules/db_text/dbt_base.c
---
Diff:
https://github.com/kamailio/kamailio/commit/bddf16db74ea779bb01805fc2cbabfd…
Patch:
https://github.com/kamailio/kamailio/commit/bddf16db74ea779bb01805fc2cbabfd…
---
diff --git a/src/modules/db_text/dbt_base.c b/src/modules/db_text/dbt_base.c
index d6d9d73f21..1e5dd01514 100644
--- a/src/modules/db_text/dbt_base.c
+++ b/src/modules/db_text/dbt_base.c
@@ -100,6 +100,7 @@ db1_con_t* dbt_init(const str* _sqlurl)
if (!DBT_CON_CONNECTION(_res))
{
LM_ERR("cannot get the link to database\n");
+ pkg_free(_res);
return NULL;
}