summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/make/dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c
index fdaf768..f269196 100644
--- a/usr.bin/make/dir.c
+++ b/usr.bin/make/dir.c
@@ -1139,8 +1139,8 @@ Dir_Destroy(void *pp)
if (p->refCount == 0) {
LstNode *ln;
- ln = Lst_Member(openDirectories, p);
- Lst_Remove(openDirectories, ln);
+ if ((ln = Lst_Member(openDirectories, p)) != NULL)
+ Lst_Remove(openDirectories, ln);
Hash_DeleteTable(&p->files);
free(p->name);
OpenPOWER on IntegriCloud