diff options
Diffstat (limited to 'lib/tilde/tilde.c')
| -rw-r--r-- | lib/tilde/tilde.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/tilde/tilde.c b/lib/tilde/tilde.c index 3788eba6..95bc4215 100644 --- a/lib/tilde/tilde.c +++ b/lib/tilde/tilde.c @@ -236,7 +236,11 @@ tilde_expand (string) string += end; expansion = tilde_expand_word (tilde_word); - xfree (tilde_word); + + if (expansion == 0) + expansion = tilde_word; + else + xfree (tilde_word); len = strlen (expansion); #ifdef __CYGWIN__ |
