Also: Note-to-self: use `free` on buffer everywhere when `malloc`.