diff options
author | Greg Hudson <ghudson@mit.edu> | 2012-08-11 00:05:24 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2012-08-11 00:28:26 -0400 |
commit | 8589d81b99db347b7440bc6c21c618aa240d66dc (patch) | |
tree | fb47dbe1f7a2baba1ac0a870680b26936ec7a092 /src/lib/gssapi/krb5/gssapiP_krb5.h | |
parent | db7aafe19a3d0d71c5c59502a9ab19541ff00804 (diff) | |
download | krb5-8589d81b99db347b7440bc6c21c618aa240d66dc.zip krb5-8589d81b99db347b7440bc6c21c618aa240d66dc.tar.gz krb5-8589d81b99db347b7440bc6c21c618aa240d66dc.tar.bz2 |
Add debug mode to gssapi_alloc.h
Because the gssalloc macros are normally equivalent to malloc and free
on Unix, we cannot use the full test suite to find cases where we
allocate with malloc and free with gssalloc_free or vice versa.
Provide a way to test for this kind of bug (if only in a special build
configuration) by supporting a DEBUG_GSSALLOC symbol, which causes the
gssalloc wrappers to be deliberately incompatible with malloc and
free.
Diffstat (limited to 'src/lib/gssapi/krb5/gssapiP_krb5.h')
-rw-r--r-- | src/lib/gssapi/krb5/gssapiP_krb5.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/gssapi/krb5/gssapiP_krb5.h b/src/lib/gssapi/krb5/gssapiP_krb5.h index 56b025b..8785ec9 100644 --- a/src/lib/gssapi/krb5/gssapiP_krb5.h +++ b/src/lib/gssapi/krb5/gssapiP_krb5.h @@ -1204,7 +1204,7 @@ data_to_gss(krb5_data *input_k5data, gss_buffer_t output_buffer) { krb5_error_code code = 0; output_buffer->length = input_k5data->length; -#ifdef _WIN32 +#if defined(_WIN32) || defined(DEBUG_GSSALLOC) if (output_buffer->length > 0) { output_buffer->value = gssalloc_malloc(output_buffer->length); if (output_buffer->value) |