Success of memory allocation needs checking.