summaryrefslogtreecommitdiff
path: root/lib/tilde
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tilde')
-rw-r--r--lib/tilde/tilde.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/tilde/tilde.c b/lib/tilde/tilde.c
index d757f7a..1b76c9f 100644
--- a/lib/tilde/tilde.c
+++ b/lib/tilde/tilde.c
@@ -404,17 +404,17 @@ tilde_expand_word (filename)
free (expansion);
}
}
- free (username);
/* If we don't have a failure hook, or if the failure hook did not
expand the tilde, return a copy of what we were passed. */
if (dirname == 0)
dirname = savestring (filename);
}
+#if defined (HAVE_GETPWENT)
else
- {
- free (username);
- dirname = glue_prefix_and_suffix (user_entry->pw_dir, filename, user_len);
- }
+ dirname = glue_prefix_and_suffix (user_entry->pw_dir, filename, user_len);
+#endif
+
+ free (username);
#if defined (HAVE_GETPWENT)
endpwent ();
#endif