ktutil: Fix leak
This commit is contained in:
@@ -278,6 +278,7 @@ json2keytab_entry(heim_dict_t d, krb5_keytab kt, size_t idx)
|
||||
(unsigned long)idx);
|
||||
bad:
|
||||
krb5_free_principal(context, e.principal);
|
||||
free(buf);
|
||||
}
|
||||
|
||||
int
|
||||
@@ -296,6 +297,7 @@ kt_import(void *opt, int argc, char **argv)
|
||||
err(1, "Could not open file %s", argv[0]);
|
||||
|
||||
json = read_file(f);
|
||||
fclose(f);
|
||||
o = heim_json_create(json, 10, flags, &json_err);
|
||||
free(json);
|
||||
if (o == NULL) {
|
||||
|
@@ -109,6 +109,7 @@ parse_enctypes(struct get_options *opt,
|
||||
free(s);
|
||||
return krb5_enomem(context);
|
||||
}
|
||||
free(s);
|
||||
s = tmp;
|
||||
}
|
||||
ret = krb5_string_to_keysalts2(context, s, nks, ks);
|
||||
|
Reference in New Issue
Block a user