Fix incorrect memory reservation.