svn rev #23299: trunk/src/lib/kadm5/unit-test/
epeisach@MIT.EDU
epeisach at MIT.EDU
Sat Nov 21 23:26:48 EST 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=23299
Commit By: epeisach
Log Message:
Clean up some memory leaks by releasing context.
Changed Files:
U trunk/src/lib/kadm5/unit-test/destroy-test.c
U trunk/src/lib/kadm5/unit-test/init-test.c
Modified: trunk/src/lib/kadm5/unit-test/destroy-test.c
===================================================================
--- trunk/src/lib/kadm5/unit-test/destroy-test.c 2009-11-21 23:08:03 UTC (rev 23298)
+++ trunk/src/lib/kadm5/unit-test/destroy-test.c 2009-11-22 04:26:48 UTC (rev 23299)
@@ -43,5 +43,6 @@
}
free(cp);
}
+ krb5_free_context(context);
exit(0);
}
Modified: trunk/src/lib/kadm5/unit-test/init-test.c
===================================================================
--- trunk/src/lib/kadm5/unit-test/init-test.c 2009-11-21 23:08:03 UTC (rev 23298)
+++ trunk/src/lib/kadm5/unit-test/init-test.c 2009-11-22 04:26:48 UTC (rev 23299)
@@ -23,14 +23,17 @@
ret = kadm5_init(context, "admin", "admin", NULL, ¶ms,
KADM5_STRUCT_VERSION, KADM5_API_VERSION_3, NULL,
&server_handle);
- if (ret == KADM5_RPC_ERROR)
+ if (ret == KADM5_RPC_ERROR) {
+ krb5_free_context(context);
exit(0);
+ }
else if (ret != 0) {
com_err("init-test", ret, "while initializing without auth");
exit(1);
} else {
fprintf(stderr, "Unexpected success while initializing without auth!\n");
(void) kadm5_destroy(server_handle);
+ krb5_free_context(context);
exit(1);
}
}
More information about the cvs-krb5
mailing list