dtcm: Coverity 88768, 89297 and 89115
authorPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 21:33:03 +0000 (22:33 +0100)
committerPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 21:33:03 +0000 (22:33 +0100)
cde/programs/dtcm/dtcm/RFCMIME.c

index efdc8e29041804518e61ab700c1553f351f88f7b..f5fb02f599e2f5691b0b3ceab7f02ad840b171ba 100644 (file)
@@ -1514,6 +1514,8 @@ rfc1522cpy(char * buf, const char * value)
             */
                char *_tmp1_;
                char *_tmp2_;
+               free(ret_locale);
+               free(ret_lang);
                ret_locale = ret_lang = _tmp1_ = NULL;
                DtXlateOpToStdLocale( DtLCX_OPER_INTERCHANGE_CODESET,
                                        ret_codeset,
@@ -1577,5 +1579,9 @@ rfc1522cpy(char * buf, const char * value)
        }
     }
 
+    free(ret_codeset);
+    free(ret_locale);
+    free(ret_lang);
+
     crlf(buf);
 }