Coverity fixes CID:45 FORWARD_NULL
authorNelson Ferreira <nelson.ferreira@ieee.org>
Mon, 10 Oct 2011 23:42:58 +0000 (19:42 -0400)
committerNelson Ferreira <nelson.ferreira@ieee.org>
Mon, 10 Oct 2011 23:42:58 +0000 (19:42 -0400)
* src/dired.c (dfr_inner): Make sure bufp is not NULL before
calling pathname_matches_p

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
src/dired.c

index 2fa35d9..e957a22 100644 (file)
@@ -361,7 +361,7 @@ dfr_inner(dirent_t *res,
        }
 
 #if USE_MATCH_ARG
-       if (!NILP(match) && !pathname_matches_p(name, match, bufp)) {
+       if (!NILP(match) && bufp && !pathname_matches_p(name, match, bufp)) {
                result_p = 0;
        }
 #endif