+Wed Sep 6 00:11:53 1995 Mark Eichin <eichin@cygnus.com>
+
+ * krb524d.c (main): set timeout inside while loop to prevent spin.
+ (cleanup_and_exit): free master_princ or close keytab, and free
+ the global context, to eliminate spurious storage use in malloc
+ debugging.
+ (init_master): free realm.
Tue Sep 05 22:10:34 1995 Chris Provenzano (proven@mit.edu)
cleanup_and_exit(1, context);
}
- timeout.tv_sec = TIMEOUT;
- timeout.tv_usec = 0;
while (1) {
FD_ZERO(&rfds);
FD_SET(s, &rfds);
+ timeout.tv_sec = TIMEOUT;
+ timeout.tv_usec = 0;
ret = select(s+1, &rfds, NULL, NULL, &timeout);
if (signalled)
memset((char *)&master_encblock, 0, sizeof(master_encblock));
(void) krb5_db_fini(context);
}
+ if (use_master) krb5_free_principal(context, master_princ);
+ if (use_keytab) krb5_kt_close(context, kt);
+ krb5_free_context(context);
exit(ret);
}
}
if ((ret = krb5_db_setup_mkey_name(context, NULL, realm, (char **) 0,
&master_princ))) {
+ free(realm);
com_err(whoami, ret, "while setting up master key name");
cleanup_and_exit(1, context);
+ } else {
+ free(realm);
}
master_keyblock.keytype = KEYTYPE_DES_CBC_MD5;