Browse Source

forgot to return null on failed allocation

tarfeef101 7 years ago
parent
commit
9858cc3325
1 changed files with 1 additions and 0 deletions
  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(lock);
     kfree(wc);
     kfree(wc);
+    return NULL;
   }
   }
   
   
   lock->owner = NULL;
   lock->owner = NULL;