Commit 9d50a63b authored by 尹佳钦's avatar 尹佳钦

红外场景触发链表删除时,调整free位置

parent 51320a71
......@@ -609,12 +609,11 @@ int bodySensor_delete(int scene_id)
if(ptr->scene_id==scene_id){
if(pre!=NULL){
free(ptr);
pre->next = ptr->next;
}else{
free(ptr);
pBodySensor = NULL;
}
free(ptr);
return 1;
}
pre = ptr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment