From 830b95c5b54ad6d7cf9c7394e982b2421e951d78 Mon Sep 17 00:00:00 2001 From: beck <> Date: Wed, 18 Feb 2015 05:48:54 +0000 Subject: fix coverity 105350 and 10345 ok miod@, doug@ --- src/usr.bin/openssl/certhash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/usr.bin/openssl/certhash.c b/src/usr.bin/openssl/certhash.c index 7458add906..2e64ffaac7 100644 --- a/src/usr.bin/openssl/certhash.c +++ b/src/usr.bin/openssl/certhash.c @@ -191,6 +191,7 @@ hashinfo_chain_sort(struct hashinfo **head) } entry->next = NULL; + free(list); return (0); } @@ -483,7 +484,7 @@ certhash_link(int dfd, struct dirent *dep, struct hashinfo **links) if (!S_ISLNK(sb.st_mode)) return (0); - n = readlinkat(dfd, dep->d_name, target, sizeof(target)); + n = readlinkat(dfd, dep->d_name, target, sizeof(target) - 1); if (n == -1) { fprintf(stderr, "failed to readlink %s\n", dep->d_name); return (-1); -- cgit v1.2.3-55-g6feb