DtTerm: Coverity (memory corruption)
authorJon Trulson <jon@radscan.com>
Fri, 26 Dec 2014 21:08:24 +0000 (14:08 -0700)
committerJon Trulson <jon@radscan.com>
Fri, 26 Dec 2014 21:08:24 +0000 (14:08 -0700)
cde/lib/DtTerm/TermPrim/TermPrimUtil.c

index df04eb34808337ebfeab5bac4bfd05d9d97c6055..6429ecaf447ae33c269c6a8b4567d5dc092ad768 100644 (file)
@@ -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;
     }
 }