From: Peter Howkins Date: Wed, 4 Jul 2018 21:27:43 +0000 (+0100) Subject: dtcm: Coverity 88741, 88121 and 88692 X-Git-Tag: 2.3.0a~179 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d8fb638dde127e5fefc3f4f2b4975c6c7f94bc04;p=oweals%2Fcde.git dtcm: Coverity 88741, 88121 and 88692 --- 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;