+2005-08-15 Tom Yu <tlyu@mit.edu>
+
+ * get_in_tkt.c (krb5_get_init_creds): Free tempstr on non-error
+ returns from krb5_string_to_deltat() to avoid memory leak.
+
2005-07-12 Tom Yu <tlyu@mit.edu>
* recvauth.c (recvauth_common): Avoid double-free on invalid
} else if ((ret = krb5_libdefault_string(context, &client->realm,
"ticket_lifetime", &tempstr))
== 0) {
- if ((ret = krb5_string_to_deltat(tempstr, &tkt_life))) {
- free(tempstr);
+ ret = krb5_string_to_deltat(tempstr, &tkt_life);
+ free(tempstr);
+ if (ret) {
goto cleanup;
}
} else {
} else if ((ret = krb5_libdefault_string(context, &client->realm,
"renew_lifetime", &tempstr))
== 0) {
- if ((ret = krb5_string_to_deltat(tempstr, &renew_life))) {
- free(tempstr);
+ ret = krb5_string_to_deltat(tempstr, &renew_life);
+ free(tempstr);
+ if (ret) {
goto cleanup;
}
} else {