[openssh-commits] [openssh] 01/03: upstream: Fix memory leak on an error path in mkdir_path

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Sep 15 18:35:01 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 961cc92164f0a68f93d1c8dfdf12fa807c3ab8ab
Author: job at openbsd.org <job at openbsd.org>
AuthorDate: Tue Sep 15 08:26:49 2026 +0000

    upstream: Fix memory leak on an error path in mkdir_path
    
    CID 913589
    
    OK djm@
    
    OpenBSD-Commit-ID: 0050b75ec87722e115d33a3d181a3c24175079e5
---
 misc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/misc.c b/misc.c
index ca8aecc67..2c6115f3a 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.216 2026/09/07 20:24:22 job Exp $ */
+/* $OpenBSD: misc.c,v 1.217 2026/09/15 08:26:49 job Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  * Copyright (c) 2005-2020 Damien Miller.  All rights reserved.
@@ -3239,6 +3239,7 @@ mkdir_path(const char *target, mode_t mode)
 	if (*dir == '/' &&
 	    (fd = open("/", O_RDONLY|O_DIRECTORY)) == -1) {
 		error_f("open(\"/\"): %s", strerror(errno));
+		free(odir);
 		return -1;
 	}
 	/* Work through the path, component-wise */

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


More information about the openssh-commits mailing list