From: Jon Trulson Date: Fri, 26 Dec 2014 21:08:24 +0000 (-0700) Subject: DtTerm: Coverity (memory corruption) X-Git-Tag: 2.2.3~94 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b0548ce1116fb306eb640ea12e1edd4146796b64;p=oweals%2Fcde.git DtTerm: Coverity (memory corruption) --- diff --git a/cde/lib/DtTerm/TermPrim/TermPrimUtil.c b/cde/lib/DtTerm/TermPrim/TermPrimUtil.c index df04eb34..6429ecaf 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimUtil.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimUtil.c @@ -510,8 +510,9 @@ ForceCloseLog(DtTermPrimitiveWidget tw) if (tw->term.log_on) { - (void) fclose(tpd->logStream); (void) DeleteLogFileEntry(tpd->logStream); + (void) fclose(tpd->logStream); + tpd->logStream = NULL; tw->term.log_on = False; } }