kdc: fix leaks

This commit is contained in:
Nicolas Williams
2019-07-05 16:59:40 -05:00
parent 75b5c94a62
commit d3ef0ee743
2 changed files with 4 additions and 3 deletions

View File

@@ -850,7 +850,7 @@ handle_islive(int fd)
} }
#endif #endif
krb5_boolean static krb5_boolean
realloc_descrs(struct descr **d, unsigned int *ndescr) realloc_descrs(struct descr **d, unsigned int *ndescr)
{ {
struct descr *tmp; struct descr *tmp;
@@ -871,7 +871,7 @@ realloc_descrs(struct descr **d, unsigned int *ndescr)
return TRUE; return TRUE;
} }
int static int
next_min_free(krb5_context context, struct descr **d, unsigned int *ndescr) next_min_free(krb5_context context, struct descr **d, unsigned int *ndescr)
{ {
size_t i; size_t i;
@@ -1260,11 +1260,11 @@ start_kdc(krb5_context context,
end: end:
kdc_log(context, config, 0, "KDC master process exiting"); kdc_log(context, config, 0, "KDC master process exiting");
free(pids);
} else { } else {
loop(context, config, &d, &ndescr, -1); loop(context, config, &d, &ndescr, -1);
kdc_log(context, config, 0, "KDC exiting"); kdc_log(context, config, 0, "KDC exiting");
} }
free(pids);
#else #else
loop(context, config, &d, &ndescr, -1); loop(context, config, &d, &ndescr, -1);
kdc_log(context, config, 0, "KDC exiting"); kdc_log(context, config, 0, "KDC exiting");

View File

@@ -175,5 +175,6 @@ main(int argc, char **argv)
start_kdc(context, config, argv[0]); start_kdc(context, config, argv[0]);
krb5_free_context(context); krb5_free_context(context);
free(config);
return 0; return 0;
} }