summaryrefslogtreecommitdiffstats
path: root/src/lib/gssapi/generic/gssapiP_generic.h
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2012-08-11 00:05:24 -0400
committerGreg Hudson <ghudson@mit.edu>2012-08-11 00:28:26 -0400
commit8589d81b99db347b7440bc6c21c618aa240d66dc (patch)
treefb47dbe1f7a2baba1ac0a870680b26936ec7a092 /src/lib/gssapi/generic/gssapiP_generic.h
parentdb7aafe19a3d0d71c5c59502a9ab19541ff00804 (diff)
downloadkrb5-8589d81b99db347b7440bc6c21c618aa240d66dc.tar.gz
krb5-8589d81b99db347b7440bc6c21c618aa240d66dc.tar.xz
krb5-8589d81b99db347b7440bc6c21c618aa240d66dc.zip
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/generic/gssapiP_generic.h')
-rw-r--r--src/lib/gssapi/generic/gssapiP_generic.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/gssapi/generic/gssapiP_generic.h b/src/lib/gssapi/generic/gssapiP_generic.h
index 1124c51e5..3fb0c7622 100644
--- a/src/lib/gssapi/generic/gssapiP_generic.h
+++ b/src/lib/gssapi/generic/gssapiP_generic.h
@@ -278,7 +278,7 @@ k5buf_to_gss(OM_uint32 *minor,
OM_uint32 status = GSS_S_COMPLETE;
char *bp = krb5int_buf_data(input_k5buf);
output_buffer->length = krb5int_buf_len(input_k5buf)+1;
-#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) {