Browse code

db_text: free pointer in case of error

(cherry picked from commit bddf16db74ea779bb01805fc2cbabfdaf8f4d62b)
(cherry picked from commit aabb2b2cfab6dc664ebc4b3d15db0d2ecb3cafd5)

Daniel-Constantin Mierla authored on 01/08/2020 14:51:39
Showing 1 changed files
... ...
@@ -100,6 +100,7 @@ db1_con_t* dbt_init(const str* _sqlurl)
100 100
 	if (!DBT_CON_CONNECTION(_res))
101 101
 	{
102 102
 		LM_ERR("cannot get the link to database\n");
103
+		pkg_free(_res);
103 104
 		return NULL;
104 105
 	}
105 106