From a02c6ba007576ddd5454f7b5dd25e53270a62d4f Mon Sep 17 00:00:00 2001 From: Kevin Wasserman Date: Thu, 20 Nov 2014 17:35:28 -0500 Subject: [PATCH] Don't try to free() gss_OID's --- json_gssapi/test/command_mocks/InitSecContextMock.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/json_gssapi/test/command_mocks/InitSecContextMock.cpp b/json_gssapi/test/command_mocks/InitSecContextMock.cpp index 472ebaf..568d63c 100644 --- a/json_gssapi/test/command_mocks/InitSecContextMock.cpp +++ b/json_gssapi/test/command_mocks/InitSecContextMock.cpp @@ -34,13 +34,17 @@ void InitSecContextMock::reset() nullify((void **)&claimant_cred_handle); nullify((void **)&context_handle); nullify((void **)&target_name); - nullify((void **)&mech_type); + // Our current handling of OIDs means attempting to free one + // will often result in a double-free or an attempt to free + // a constant OID. For now, it is better to occasionally leak. + // We should revisit this -Kevin + mech_type = GSS_C_NO_OID; req_flags = 0; time_req = 0; nullify((void **)&input_chan_bindings); input_token.length = 0; input_token.value = NULL; - nullify((void **)&actual_mech_type); + actual_mech_type = GSS_C_NO_OID; output_token.length = 0; output_token.value = 0; ret_flags = 0; -- 2.1.4