httpkadmind: Fix FD leak

Using `mkstemp()` is nice, but if you don't need the FD, then don't
forget to close it!
This commit is contained in:
Nicolas Williams
2020-09-15 15:24:29 -05:00
parent 4a4ceaf287
commit c12ca129b6

View File

@@ -990,6 +990,8 @@ make_keytab(kadmin_request_desc r)
ret = errno;
if (ret == 0)
ret = krb5_kt_resolve(r->context, r->keytab_name, &r->keytab);
if (fd != -1)
(void) close(fd);
return ret;
}