1
0
mirror of https://github.com/Yubico/yubico-pam.git synced 2025-02-01 01:52:17 +01:00

Merge branch 'pr-165'

This commit is contained in:
Klas Lindfors 2018-05-23 10:56:26 +02:00
commit 05f74ea8e5
No known key found for this signature in database
GPG Key ID: BCA00FD4B2168C0A
3 changed files with 5 additions and 1 deletions

View File

@ -833,7 +833,9 @@ parse_cfg (int flags, int argc, const char **argv, struct cfg *cfg)
if (file) if (file)
{ {
cfg->debug_file = file; cfg->debug_file = file;
} } else {
close(fd);
}
} }
} }
} }

1
util.c
View File

@ -203,6 +203,7 @@ int generate_random(void *buf, int len)
u = fdopen(fd, "r"); u = fdopen(fd, "r");
if (!u) { if (!u) {
close(fd);
return -1; return -1;
} }

View File

@ -258,6 +258,7 @@ do_add_hmac_chalresp(YK_KEY *yk, uint8_t slot, bool verbose, char *output_dir, u
f = fdopen (fd, "w"); f = fdopen (fd, "w");
if (! f) { if (! f) {
fprintf (stderr, "fdopen: %s\n", strerror (errno)); fprintf (stderr, "fdopen: %s\n", strerror (errno));
close(fd);
goto out; goto out;
} }