diff options
author | Colin Watson <cjwatson@debian.org> | 2012-05-17 13:04:02 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2012-05-17 13:04:02 +0100 |
commit | dd5ed53e20d218607260916a6b04d1c8c5b3d88f (patch) | |
tree | c59b4dbcc610f10700945f885adf3bddc2542c26 /sftp.c | |
parent | 8241a65bf12ac53c1b7304bba7ce739aad80b8b8 (diff) | |
parent | b9bc38990c5eb5d99e28ca5af6d3491fd4a0060a (diff) |
merge 6.0p1
Diffstat (limited to 'sftp.c')
-rw-r--r-- | sftp.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp.c,v 1.132 2010/12/04 00:18:01 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 | * |
@@ -793,7 +793,8 @@ do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path, | |||
793 | memset(&g, 0, sizeof(g)); | 793 | memset(&g, 0, sizeof(g)); |
794 | 794 | ||
795 | if (remote_glob(conn, path, | 795 | if (remote_glob(conn, path, |
796 | GLOB_MARK|GLOB_NOCHECK|GLOB_BRACE|GLOB_KEEPSTAT, NULL, &g) || | 796 | GLOB_MARK|GLOB_NOCHECK|GLOB_BRACE|GLOB_KEEPSTAT|GLOB_NOSORT, |
797 | NULL, &g) || | ||
797 | (g.gl_pathc && !g.gl_matchc)) { | 798 | (g.gl_pathc && !g.gl_matchc)) { |
798 | if (g.gl_pathc) | 799 | if (g.gl_pathc) |
799 | globfree(&g); | 800 | globfree(&g); |
@@ -1630,8 +1631,10 @@ complete_cmd_parse(EditLine *el, char *cmd, int lastarg, char quote, | |||
1630 | } | 1631 | } |
1631 | list[count] = NULL; | 1632 | list[count] = NULL; |
1632 | 1633 | ||
1633 | if (count == 0) | 1634 | if (count == 0) { |
1635 | xfree(list); | ||
1634 | return 0; | 1636 | return 0; |
1637 | } | ||
1635 | 1638 | ||
1636 | /* Complete ambigious command */ | 1639 | /* Complete ambigious command */ |
1637 | tmp = complete_ambiguous(cmd, list, count); | 1640 | tmp = complete_ambiguous(cmd, list, count); |