浏览代码

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)
 	{