Try to not leak memory.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18828 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -468,6 +468,7 @@ get_new_tickets(krb5_context context,
|
||||
krb5_deltat start_time = 0;
|
||||
krb5_deltat renew = 0;
|
||||
char *renewstr = NULL;
|
||||
krb5_enctype *enctype = NULL;
|
||||
|
||||
passwd[0] = '\0';
|
||||
|
||||
@@ -552,8 +553,8 @@ get_new_tickets(krb5_context context,
|
||||
}
|
||||
|
||||
if(etype_str.num_strings) {
|
||||
krb5_enctype *enctype = NULL;
|
||||
int i;
|
||||
|
||||
enctype = malloc(etype_str.num_strings * sizeof(*enctype));
|
||||
if(enctype == NULL)
|
||||
errx(1, "out of memory");
|
||||
@@ -682,6 +683,9 @@ get_new_tickets(krb5_context context,
|
||||
|
||||
krb5_free_cred_contents (context, &cred);
|
||||
|
||||
if (enctype)
|
||||
free(enctype);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user