]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: memleak of editline history; ok dtucker@
authordjm@openbsd.org <djm@openbsd.org>
Mon, 15 Sep 2025 04:49:00 +0000 (04:49 +0000)
committerDamien Miller <djm@mindrot.org>
Mon, 15 Sep 2025 06:13:22 +0000 (16:13 +1000)
OpenBSD-Commit-ID: a244c54eb074cf7fbe28f7ac4f03ace270f7a999

sftp.c

diff --git a/sftp.c b/sftp.c
index c27926b37899cb450f5d098e3c15563a0de86386..ff85ab507695cdff57f5cb3de0147a5b87e6d2b9 100644 (file)
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp.c,v 1.241 2025/09/02 09:34:48 djm Exp $ */
+/* $OpenBSD: sftp.c,v 1.242 2025/09/15 04:49:00 djm Exp $ */
 /*
  * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
  *
@@ -2343,6 +2343,8 @@ interactive_loop(struct sftp_conn *conn, char *file1, char *file2)
        free(conn);
 
 #ifdef USE_LIBEDIT
+       if (hl != NULL)
+               history_end(hl);
        if (el != NULL)
                el_end(el);
 #endif /* USE_LIBEDIT */