Explorar o código

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 %!s(int64=15) %!d(string=hai) anos
pai
achega
023beb6191
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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)
 	{