if (verbose && logfile)
fprintf(logfile, "Importing context: %7.4f seconds\n",
timeval_subtract(&tm1, &tm2));
- free(context_token.value);
+ (void) gss_release_buffer(&min_stat, &context_token);
return 0;
}
return gssalloc_malloc(size);
if (memcmp(p, "gssalloc", 8) != 0)
abort();
- return (char *)realloc(p, size) + 8;
+ return (char *)realloc(p, size + 8) + 8;
}
#else /* not _WIN32 or DEBUG_GSSALLOC */
exp_composite_name->length += 4; /* length of encoded attributes */
if (attrs != NULL)
exp_composite_name->length += attrs->length;
- exp_composite_name->value = malloc(exp_composite_name->length);
+ exp_composite_name->value = gssalloc_malloc(exp_composite_name->length);
if (exp_composite_name->value == NULL) {
code = ENOMEM;
goto cleanup;
if (desired_output_len == 0)
return GSS_S_COMPLETE;
- prf_out->value = k5alloc(desired_output_len, &code);
+ prf_out->value = gssalloc_malloc(desired_output_len);
if (prf_out->value == NULL) {
code = KG_INPUT_TOO_LONG;
goto cleanup;
if (minor != 0)
return GSS_S_DEFECTIVE_TOKEN;
- output_token->value = malloc(body_size);
+ output_token->value = gssalloc_malloc(body_size);
if (output_token->value == NULL)
return GSS_S_FAILURE;
assert(tokenSize > 2);
tokenSize -= 2; /* TOK_ID */
- output_token->value = malloc(tokenSize);
+ output_token->value = gssalloc_malloc(tokenSize);
if (output_token->value == NULL)
return GSS_S_FAILURE;
length = token.length + 4 + ctx->mech_type->length;
interprocess_token->length = length;
- interprocess_token->value = malloc(length);
+ interprocess_token->value = gssalloc_malloc(length);
if (interprocess_token->value == 0) {
*minor_status = ENOMEM;
status = GSS_S_FAILURE;
static spnego_token_t
make_spnego_token(const char *name)
{
- return (spnego_token_t)strdup(name);
+ return (spnego_token_t)gssalloc_strdup(name);
}
static gss_buffer_desc