From d8fb638dde127e5fefc3f4f2b4975c6c7f94bc04 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Wed, 4 Jul 2018 22:27:43 +0100 Subject: [PATCH] dtcm: Coverity 88741, 88121 and 88692 --- cde/programs/dtcm/dtcm/RFCMIME.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cde/programs/dtcm/dtcm/RFCMIME.c b/cde/programs/dtcm/dtcm/RFCMIME.c index bde71f7a..efdc8e29 100644 --- a/cde/programs/dtcm/dtcm/RFCMIME.c +++ b/cde/programs/dtcm/dtcm/RFCMIME.c @@ -514,6 +514,9 @@ CvtStr( char *charSet, void *from, unsigned long from_len, &InterChCodeSet ); } else { /* Convert charSet to StdInterChangeCodeSet */ + free(ret_locale); + free(ret_lang); + free(ret_codeset); ret_locale = ret_lang = ret_codeset = NULL; DtXlateOpToStdLocale( DtLCX_OPER_MIME, charSet, @@ -551,6 +554,9 @@ CvtStr( char *charSet, void *from, unsigned long from_len, #endif /* _AIX */ { /* Convert InterChCodeSet to StdCodeSet */ + free(ret_locale); + free(ret_lang); + free(ret_codeset); ret_locale = ret_lang = ret_codeset = NULL; DtXlateOpToStdLocale( DtLCX_OPER_INTERCHANGE_CODESET, InterChCodeSet, @@ -579,6 +585,9 @@ CvtStr( char *charSet, void *from, unsigned long from_len, &from_codeset ); } else { /* Convert charSet to StdInterChangeCodeSet */ + free(ret_locale); + free(ret_lang); + free(ret_codeset); ret_locale = ret_lang = ret_codeset = NULL; DtXlateOpToStdLocale( DtLCX_OPER_MIME, charSet, @@ -606,6 +615,9 @@ CvtStr( char *charSet, void *from, unsigned long from_len, &InterChCodeSet ); } else { /* Convert charSet to StdInterChangeCodeSet */ + free(ret_locale); + free(ret_lang); + free(ret_codeset); ret_locale = ret_lang = ret_codeset = NULL; DtXlateOpToStdLocale( DtLCX_OPER_MIME, charSet, @@ -623,6 +635,10 @@ CvtStr( char *charSet, void *from, unsigned long from_len, &to_codeset ); } + free(ret_locale); + free(ret_lang); + free(ret_codeset); + *to = NULL; *to_len = 0; -- 2.25.1