Browse code

db_text: free pointer in case of error

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