svn rev #24989: trunk/src/lib/kadm5/
ghudson@MIT.EDU
ghudson at MIT.EDU
Fri Jun 24 16:12:24 EDT 2011
http://src.mit.edu/fisheye/changelog/krb5/?cs=24989
Commit By: ghudson
Log Message:
Use zapfree in krb5_free_key_data_contents().
Changed Files:
U trunk/src/lib/kadm5/misc_free.c
Modified: trunk/src/lib/kadm5/misc_free.c
===================================================================
--- trunk/src/lib/kadm5/misc_free.c 2011-06-23 19:50:04 UTC (rev 24988)
+++ trunk/src/lib/kadm5/misc_free.c 2011-06-24 20:12:24 UTC (rev 24989)
@@ -3,6 +3,7 @@
* Copyright 1993 OpenVision Technologies, Inc., All Rights Reserved
*/
+#include "k5-int.h"
#include <kadm5/admin.h>
#include <stdlib.h>
#include "server_internal.h"
@@ -36,12 +37,8 @@
int i, idx;
idx = (key->key_data_ver == 1 ? 1 : 2);
- for (i = 0; i < idx; i++) {
- if (key->key_data_contents[i]) {
- memset(key->key_data_contents[i], 0, key->key_data_length[i]);
- free(key->key_data_contents[i]);
- }
- }
+ for (i = 0; i < idx; i++)
+ zapfree(key->key_data_contents[i], key->key_data_length[i]);
return KADM5_OK;
}
More information about the cvs-krb5
mailing list