diff options
| author | Xin LI <delphij@FreeBSD.org> | 2010-04-01 00:38:38 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2010-04-01 00:38:38 +0000 |
| commit | 4018626f75a16eecaec42faabb55b3c483600570 (patch) | |
| tree | e5186caa7c3ff0bc8b363c78252ceda3435f9122 /libexec | |
| parent | e952596a10a17d33ddaf86c916bcc3b1c08da597 (diff) | |
Notes
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/ftpd/popen.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libexec/ftpd/popen.c b/libexec/ftpd/popen.c index 3c187b94daf9..8a739dc2ffed 100644 --- a/libexec/ftpd/popen.c +++ b/libexec/ftpd/popen.c @@ -110,10 +110,11 @@ ftpd_popen(char *program, char *type) flags |= GLOB_LIMIT; if (glob(argv[argc], flags, NULL, &gl)) gargv[gargc++] = strdup(argv[argc]); - else + else if (gl.gl_pathc > 0) { for (pop = gl.gl_pathv; *pop && gargc < (MAXGLOBARGS-1); pop++) gargv[gargc++] = strdup(*pop); + } globfree(&gl); } gargv[gargc] = NULL; |
