diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2017-03-10 08:18:32 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2017-03-12 00:50:18 +0100 |
commit | ef653dd5bd5777132d9f9ee356225f9ee3379504 (patch) | |
tree | 1da4f4804cdb7ba1e7702ebf0895ec704311f222 /krl.c | |
parent | sync fmt_scaled.c with OpenBSD (diff) | |
download | openssh-ef653dd5bd5777132d9f9ee356225f9ee3379504.tar.xz openssh-ef653dd5bd5777132d9f9ee356225f9ee3379504.zip |
upstream commit
krl.c
Upstream-ID: fc5e695d5d107d730182e2da7b23f00b489e0ee1
Diffstat (limited to 'krl.c')
-rw-r--r-- | krl.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -14,7 +14,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $OpenBSD: krl.c,v 1.38 2016/09/12 01:22:38 deraadt Exp $ */ +/* $OpenBSD: krl.c,v 1.39 2017/03/10 07:18:32 dtucker Exp $ */ #include "includes.h" @@ -1089,7 +1089,7 @@ ssh_krl_from_blob(struct sshbuf *buf, struct ssh_krl **krlp, break; case KRL_SECTION_SIGNATURE: /* Handled above, but still need to stay in synch */ - sshbuf_reset(sect); + sshbuf_free(sect); sect = NULL; if ((r = sshbuf_skip_string(copy)) != 0) goto out; @@ -1288,7 +1288,8 @@ ssh_krl_file_contains_key(const char *path, const struct sshkey *key) debug2("%s: checking KRL %s", __func__, path); r = ssh_krl_check_key(krl, key); out: - close(fd); + if (fd != -1) + close(fd); sshbuf_free(krlbuf); ssh_krl_free(krl); if (r != 0) |