[openssh-commits] [openssh] 03/04: upstream: leaks on error paths; spotted by Coverity CID 913598

git+noreply at mindrot.org git+noreply at mindrot.org
Wed Sep 16 15:04:52 AEST 2026


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 600eca5cfd7e054af1d4d15394c474df07ae2d44
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Wed Sep 16 05:03:07 2026 +0000

    upstream: leaks on error paths; spotted by Coverity CID 913598
    
    OpenBSD-Commit-ID: 70cde2c42ea549b6f8aff523428e221aad4be1d8
---
 misc-agent.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/misc-agent.c b/misc-agent.c
index eaf08b079..5f36d726d 100644
--- a/misc-agent.c
+++ b/misc-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc-agent.c,v 1.8 2026/09/16 00:25:50 djm Exp $ */
+/* $OpenBSD: misc-agent.c,v 1.9 2026/09/16 05:03:07 djm Exp $ */
 /*
  * Copyright (c) 2025 Damien Miller <djm at mindrot.org>
  *
@@ -411,7 +411,7 @@ agent_cleanup_stale(const char *pathspec, const char *username, uid_t uid,
 	/* Only consider sockets last modified > 1 hour ago */
 	if (clock_gettime(CLOCK_REALTIME, &now) != 0) {
 		error_f("clock_gettime: %s", strerror(errno));
-		return;
+		goto out;
 	}
 	sub.tv_sec = 60 * 60;
 	sub.tv_nsec = 0;
@@ -421,7 +421,7 @@ agent_cleanup_stale(const char *pathspec, const char *username, uid_t uid,
 	if (!ignore_hosthash) {
 		if ((path = agent_hostname_hash()) == NULL) {
 			error_f("couldn't get hostname hash");
-			return;
+			goto out;
 		}
 		xasprintf(&prefix, "s.%s.", path);
 		free(path);

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list