[openssh-commits] [openssh] 01/04: upstream: fix leak on error path; Coverity CID 481976

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Jun 24 19:25:23 AEST 2025


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

djm pushed a commit to branch master
in repository openssh.

commit ad38ec5f1b6768944d64ed7709da8706538b5509
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Tue Jun 17 01:19:27 2025 +0000

    upstream: fix leak on error path; Coverity CID 481976
    
    OpenBSD-Commit-ID: 963dba2c804e2fd8efea2256092899874d0dbc7b
---
 misc-agent.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/misc-agent.c b/misc-agent.c
index cf9b0fa0c..5ea91ebe3 100644
--- a/misc-agent.c
+++ b/misc-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc-agent.c,v 1.5 2025/05/22 12:14:19 dtucker Exp $ */
+/* $OpenBSD: misc-agent.c,v 1.6 2025/06/17 01:19:27 djm Exp $ */
 /*
  * Copyright (c) 2025 Damien Miller <djm at mindrot.org>
  *
@@ -169,6 +169,7 @@ ensure_mkdir(const char *homedir, const char *subdir)
 		debug("created directory %s", path);
 	else if (errno != EEXIST) {
 		error_f("mkdir %s: %s", path, strerror(errno));
+		free(path);
 		return -1;
 	}
 	free(path);

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


More information about the openssh-commits mailing list