瀏覽代碼

small changes to memory stuffs to hopefully not fail

tarfeef101 6 年之前
父節點
當前提交
6c05680a6b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      kern/synchprobs/traffic_synch.c

+ 1 - 1
kern/synchprobs/traffic_synch.c

@@ -132,7 +132,7 @@ static void dellist(list * dead)
   while (temp)
   {
     car * temp2 = temp->next;
-    cv_destroy(temp->cv);
+    if (temp->cv) cv_destroy(temp->cv);
     kfree(temp);
     temp = temp2;
   }