kbx: Simplify by removing custom memory functions.