]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix small leak in wshelper DLL 759/head
authorGreg Hudson <ghudson@mit.edu>
Mon, 9 Apr 2018 15:00:05 +0000 (11:00 -0400)
committerGreg Hudson <ghudson@mit.edu>
Mon, 9 Apr 2018 23:45:36 +0000 (19:45 -0400)
Remove a double initialization of dwHesPwUidIndex in wshelper which
caused the first initialization to leak a thread-local storage handle.
Reported by Sergey Ilinykh.

ticket: 8663

src/util/wshelper/dllmain.c

index 5ae0016e6933dd48c2a7c586f670c442da2f5080..d3706d2143b2e4c4941ab3cb3e10f54da7842e50 100644 (file)
@@ -43,8 +43,6 @@ DllMain(
             return FALSE;
        if ((dwHesPwUidIndex = TlsAlloc()) == TLS_OUT_OF_INDEXES)
             return FALSE;
-       if ((dwHesPwUidIndex = TlsAlloc()) == TLS_OUT_OF_INDEXES)
-            return FALSE;
        if ((dwGhnIndex = TlsAlloc()) == TLS_OUT_OF_INDEXES)
             return FALSE;
        if ((dwGhaIndex = TlsAlloc()) == TLS_OUT_OF_INDEXES)