소스 검색

db_text: free pointer in case of error

Daniel-Constantin Mierla 5 년 전
부모
커밋
bddf16db74
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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;
 	}