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