summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--sftp.c6
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index d55a397bf..760772d59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
120111125
2 - OpenBSD CVS Sync
3 - oga@cvs.openbsd.org 2011/11/16 12:24:28
4 [sftp.c]
5 Don't leak list in complete_cmd_parse if there are no commands found.
6 Discovered when I was ``borrowing'' this code for something else.
7 ok djm@
8
120111121 920111121
2 - (dtucker) [configure.ac] Set _FORTIFY_SOURCE. ok djm@ 10 - (dtucker) [configure.ac] Set _FORTIFY_SOURCE. ok djm@
3 11
diff --git a/sftp.c b/sftp.c
index 5c03f89d7..da7fbab38 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp.c,v 1.133 2011/09/22 06:29:03 djm Exp $ */ 1/* $OpenBSD: sftp.c,v 1.134 2011/11/16 12:24:28 oga Exp $ */
2/* 2/*
3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -1631,8 +1631,10 @@ complete_cmd_parse(EditLine *el, char *cmd, int lastarg, char quote,
1631 } 1631 }
1632 list[count] = NULL; 1632 list[count] = NULL;
1633 1633
1634 if (count == 0) 1634 if (count == 0) {
1635 xfree(list);
1635 return 0; 1636 return 0;
1637 }
1636 1638
1637 /* Complete ambigious command */ 1639 /* Complete ambigious command */
1638 tmp = complete_ambiguous(cmd, list, count); 1640 tmp = complete_ambiguous(cmd, list, count);