Browse Source

db_text: free pointer in case of error

(cherry picked from commit bddf16db74ea779bb01805fc2cbabfdaf8f4d62b)
Daniel-Constantin Mierla 5 years ago
parent
commit
8ac4f388f8
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/modules/db_text/dbt_base.c

+ 1 - 0
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;
 	}