Fixed malloc cast warning.