Commit 1e848d2e4eaa5664d99b0e59f124f1eabf039f05

John Norrbin 2019-01-04T19:24:59

Handle malloc returning null Locks are required for multi-threading. If memory can't be allocated, exit the program with memory error. If we let the program continue, it will deadlock in the next part of the code anyway so better end it before.