summaryrefslogtreecommitdiff
path: root/libdiskfs/name-cache.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-04-02 18:57:49 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-04-02 18:57:49 +0000
commitd6257a5e444cab85bbb2e62106fb45708358bba0 (patch)
tree611e01f05b1cc1c9cca2b878d86ecbc891506102 /libdiskfs/name-cache.c
parent11f43eff651619344c782d2d628d061089a6e95e (diff)
(diskfs_enter_cache): Don't set LC->next->prev if LC->next is null.
Diffstat (limited to 'libdiskfs/name-cache.c')
-rw-r--r--libdiskfs/name-cache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libdiskfs/name-cache.c b/libdiskfs/name-cache.c
index 60f6c3fb..e4a7de91 100644
--- a/libdiskfs/name-cache.c
+++ b/libdiskfs/name-cache.c
@@ -86,7 +86,8 @@ diskfs_enter_cache (struct node *dir, struct node *np, char *name)
/* Add the new entry at the front */
lc->next = lookup_cache_head;
lc->prev = 0;
- lc->next->prev = lc;
+ if (lc->next)
+ lc->next->prev = lc;
lookup_cache_head = lc;
if (!lc->next)
lookup_cache_tail = lc;