Fix segfault when a non-matching filter is applied twice

This commit is contained in:
lostd 2015-01-27 09:47:56 +02:00
parent 892c7c850a
commit 9679e132d4

View file

@ -678,7 +678,8 @@ nochange:
filter_re = re;
DPRINTF_S(filter);
/* Save current */
oldpath = makepath(path, dents[cur].name);
if (n > 0)
oldpath = makepath(path, dents[cur].name);
goto out;
case SEL_NEXT:
if (cur < n - 1)