Explorar o código

db_text: free pointer in case of error

Daniel-Constantin Mierla %!s(int64=5) %!d(string=hai) anos
pai
achega
bddf16db74
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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;
 	}