소스 검색

pdt(k): reset pdtree head if error in init

- avoid second free attempt in mod destroy if the module does not initialize properly
Elena-Ramona Modroiu 15 년 전
부모
커밋
023beb6191
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      modules_k/pdt/pdt.c

+ 3 - 0
modules_k/pdt/pdt.c

@@ -256,7 +256,10 @@ error1:
 		pdt_lock = 0;
 	}
 	if(_ptree!=0)
+	{
 		shm_free(_ptree);
+		_ptree = 0;
+	}
 
 	if(db_con!=NULL)
 	{