Skip to content

Commit 5394561

Browse files
committed
fix(win32): cleanup client state in addon destructor
1 parent e1396e0 commit 5394561

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/kerberos.h

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include <nan.h>
55
#include "kerberos_common.h"
6+
67
class KerberosServer : public Nan::ObjectWrap {
78
public:
89
static NAN_MODULE_INIT(Init);

src/win32/kerberos_win32.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ NAN_INLINE std::wstring WStringOptionValue(v8::Local<v8::Object> options, const
3030

3131
/// KerberosClient
3232
KerberosClient::~KerberosClient() {
33-
// if (_state != NULL) {
34-
// authenticate_gss_client_clean(_state);
35-
// _state = NULL;
36-
// }
33+
if (_state != NULL) {
34+
auth_sspi_client_clean(_state);
35+
_state = NULL;
36+
}
3737
}
3838

3939
NAN_METHOD(KerberosClient::Step) {

0 commit comments

Comments
 (0)