diff --git a/noice.c b/noice.c index 37cc91db..820b851a 100644 --- a/noice.c +++ b/noice.c @@ -551,10 +551,8 @@ nochange: goto nochange; } else { dir = xdirname(path); - tmp = xmalloc(strlen(dir) + 1); - strlcpy(tmp, dir, strlen(dir) + 1); free(path); - path = tmp; + path = dir; free(filter); filter = xstrdup(ifilter); /* Reset filter */ /* Recall history */