diff options
Diffstat (limited to 'source4/heimdal/lib/gssapi/mech/mech_locl.h')
-rw-r--r-- | source4/heimdal/lib/gssapi/mech/mech_locl.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source4/heimdal/lib/gssapi/mech/mech_locl.h b/source4/heimdal/lib/gssapi/mech/mech_locl.h index 17721fd3ce..cb10c23c38 100644 --- a/source4/heimdal/lib/gssapi/mech/mech_locl.h +++ b/source4/heimdal/lib/gssapi/mech/mech_locl.h @@ -64,4 +64,17 @@ #include "utils.h" #define _mg_buffer_zero(buffer) \ - do { (buffer)->value = NULL; (buffer)->length = 0; } while(0) + do { \ + if (buffer) { \ + (buffer)->value = NULL; \ + (buffer)->length = 0; \ + } \ + } while(0) + +#define _mg_oid_set_zero(oid_set) \ + do { \ + if (oid_set) { \ + (oid_set)->elements = NULL; \ + (oid_set)->count = 0; \ + } \ + } while(0) |