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);