Improved memory management with char pointers returned by c library.