[openssh-commits] [openssh] 02/04: upstream: fix inverted logic that could cause a memleak; spotted en

git+noreply at mindrot.org git+noreply at mindrot.org
Wed Sep 16 15:04:51 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 56c1d08b6c5c2ec867c3ebf2e68a283ccb5b1701
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Wed Sep 16 05:00:51 2026 +0000

    upstream: fix inverted logic that could cause a memleak; spotted en
    
    passant by Coverity CID 913599
    
    OpenBSD-Commit-ID: 72f712175bdf2daf660d4dd193316681aa9eed94
---
 channels.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/channels.c b/channels.c
index b672e2e75..e1c98d756 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.468 2026/09/16 04:12:42 dtucker Exp $ */
+/* $OpenBSD: channels.c,v 1.469 2026/09/16 05:00:51 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -326,7 +326,7 @@ free_connect_ctx(struct channel_connect *cctx)
 static void
 channel_free_connect_ctx(Channel *c)
 {
-	if (c == NULL || c->connect_ctx)
+	if (c == NULL || c->connect_ctx == NULL)
 		return;
 	free_connect_ctx(c->connect_ctx);
 	free(c->connect_ctx);

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


More information about the openssh-commits mailing list