Use the err code returned
Free allocated memory correctly
Fix compile error by returning values properly
Fixed memory leaks, incorrect type in malloc, removed unused code.
Remove unused code
Remove unused code
Free allocated memory, use proper type in malloc, remove unused code
Remove unused code
Free memory proprely, use correct type in malloc
Free memory properly, use correct type in malloc, call strcat only if
the source is valid
Free memory properly, use correct type in malloc
Free memory properly, use correct type in malloc
Free memory properly, use correct type in malloc
Free memory properly, use correct type in malloc
Free memory properly, use correct type in malloc
Free memory properly, use correct type in malloc
Merge pull request #8 from prasannatsm/static_analysis_fixes

Fixed issues reported by clang static analyser.