fix compilation warning about malloc

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>