Fix up uses of talloc

and change one malloc to talloc