krb5 commit: Explain memory allocation policy in oid_ops.c
Greg Hudson
ghudson at MIT.EDU
Wed Aug 1 14:45:11 EDT 2012
https://github.com/krb5/krb5/commit/120408c1516d39bccbdfc8ed8dfdf620d9908179
commit 120408c1516d39bccbdfc8ed8dfdf620d9908179
Author: Greg Hudson <ghudson at mit.edu>
Date: Wed Aug 1 14:43:43 2012 -0400
Explain memory allocation policy in oid_ops.c
src/lib/gssapi/generic/oid_ops.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/lib/gssapi/generic/oid_ops.c b/src/lib/gssapi/generic/oid_ops.c
index 1159efe..ff5096d 100644
--- a/src/lib/gssapi/generic/oid_ops.c
+++ b/src/lib/gssapi/generic/oid_ops.c
@@ -58,6 +58,13 @@
#include <errno.h>
#include <ctype.h>
+/*
+ * The functions for allocating and releasing individual OIDs use malloc and
+ * free instead of the gssalloc wrappers, because the mechglue currently mixes
+ * generic_gss_copy_oid() with hand-freeing of OIDs. We do not need to free
+ * free OIDs allocated by mechanisms, so this should not be a problem.
+ */
+
OM_uint32
generic_gss_release_oid(OM_uint32 *minor_status, gss_OID *oid)
{
More information about the cvs-krb5
mailing list