diff options
Diffstat (limited to 'lib/pathsearch.c')
-rw-r--r-- | lib/pathsearch.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pathsearch.c b/lib/pathsearch.c index 363b5ee6..76b21997 100644 --- a/lib/pathsearch.c +++ b/lib/pathsearch.c @@ -24,6 +24,7 @@ # include "config.h" #endif /* HAVE_CONFIG_H */ +#include <assert.h> #include <errno.h> #include <stdbool.h> #include <string.h> @@ -82,6 +83,7 @@ static bool pathsearch (const char *name, const mode_t bits) } filename = xasprintf ("%s/%s", element, name); + assert (filename); if (stat (filename, &st) == -1) { free (filename); continue; |