noice.c | 4 +--- diff --git a/noice.c b/noice.c index 37cc91db3fbfb9b96fe73f44a5271a78b09980d4..820b851a6e2a0be68e3603803f87c245c88c7f1a 100644 --- a/noice.c +++ b/noice.c @@ -551,10 +551,8 @@ if (strcmp(path, "/") == 0) { 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 */