Pārlūkot izejas kodu

forgot to return null on failed allocation

tarfeef101 6 gadi atpakaļ
vecāks
revīzija
9858cc3325
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      kern/thread/synch.c

+ 1 - 0
kern/thread/synch.c

@@ -164,6 +164,7 @@ struct lock * lock_create(const char * name)
   {
     kfree(lock);
     kfree(wc);
+    return NULL;
   }
   
   lock->owner = NULL;