Your question having been answered, I would nonetheless be remiss, give that your interest is:
more safety
if I did not mention that using malloc at all is definitely on the less safe side of things. This being C++, there are much safer options and the only reason I can think of to use malloc is if you have to use some existing library that forces you to provide it with just a big lump of raw space on the heap.