From: Kevin Wasserman Date: Thu, 20 Nov 2014 22:35:28 +0000 (-0500) Subject: Don't try to free() gss_OID's X-Git-Url: http://www.project-moonshot.org/gitweb/?p=gssweb.git;a=commitdiff_plain;h=a02c6ba007576ddd5454f7b5dd25e53270a62d4f Don't try to free() gss_OID's --- 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;