accept_sec_context: only destroy request if it is populated
[mech_eap.orig] / util_exts.c
index 5cdbf1b..88cec5b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, JANET(UK)
+ * Copyright (c) 2011, JANET(UK)
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -395,6 +395,9 @@ encodeExtensions(OM_uint32 *minor,
     assert(p == (unsigned char *)buffer->value + required);
     assert(buffer->value != NULL);
 
+    major = GSS_S_COMPLETE;
+    *minor = 0;
+
 cleanup:
     if (GSS_ERROR(major)) {
         gss_release_buffer(&tmpMinor, buffer);