[30206] in CVS-changelog-for-Kerberos-V5
krb5 commit: Fix Leash build error with recent Visual Studio
daemon@ATHENA.MIT.EDU (Greg Hudson)
Sun May 13 01:13:58 2018
Date: Sun, 13 May 2018 01:13:44 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201805130513.w4D5DiV3023894@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
https://github.com/krb5/krb5/commit/e7315768eb52ad44e73ff1c51ef18fe5371412fc
commit e7315768eb52ad44e73ff1c51ef18fe5371412fc
Author: Greg Hudson <ghudson@mit.edu>
Date:   Sun May 6 22:29:40 2018 -0400
    Fix Leash build error with recent Visual Studio
    
    Visual Studio 2015 and later do not allow manipulation of the _flag
    field inside a file handle.  In Leash's out2con.cpp (used only for the
    debugging -console flag), do not try to mark the allocated file handle
    as free after copying it to *stdout; a one-time memory leak here is
    unimportant.
    
    ticket: 8679 (new)
 src/windows/leash/out2con.cpp |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/src/windows/leash/out2con.cpp b/src/windows/leash/out2con.cpp
index f7a1d35..877eac1 100644
--- a/src/windows/leash/out2con.cpp
+++ b/src/windows/leash/out2con.cpp
@@ -96,9 +96,7 @@ ConsoleEcho::ConsoleEcho()
     FILE* fp = _fdopen(m_pipefd, "w");
     // copy to stdout
     *stdout = *fp;
-    // now slam the allocated FILE's _flag to zero to mark it as free without
-    // actually closing the os file handle and pipe
-    fp->_flag = 0;
+    // fp leaks, but we can't close it without closing the OS file handle
 
     // disable buffering
     setvbuf(stdout, NULL, _IONBF, 0);
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5