summaryrefslogtreecommitdiffstats
path: root/cmd-string.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-string.c')
-rw-r--r--cmd-string.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd-string.c b/cmd-string.c
index 27b051b1..a5dabb56 100644
--- a/cmd-string.c
+++ b/cmd-string.c
@@ -344,8 +344,7 @@ cmd_string_expand_tilde(const char *s, size_t *p)
return (NULL);
if ((pw = getpwnam(username)) != NULL)
home = pw->pw_dir;
- if (username != NULL)
- xfree(username);
+ xfree(username);
}
if (home == NULL)
return (NULL);