Explorar o código

forgot to return null on failed allocation

tarfeef101 %!s(int64=7) %!d(string=hai) anos
pai
achega
9858cc3325
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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;