[sr-dev] git:master:bddf16db: db_text: free pointer in case of error
Daniel-Constantin Mierla
miconda at gmail.com
Sun Aug 2 17:09:24 CEST 2020
Module: kamailio
Branch: master
Commit: bddf16db74ea779bb01805fc2cbabfdaf8f4d62b
URL: https://github.com/kamailio/kamailio/commit/bddf16db74ea779bb01805fc2cbabfdaf8f4d62b
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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/bddf16db74ea779bb01805fc2cbabfdaf8f4d62b.diff
Patch: https://github.com/kamailio/kamailio/commit/bddf16db74ea779bb01805fc2cbabfdaf8f4d62b.patch
---
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;
}
More information about the sr-dev
mailing list