From d6257a5e444cab85bbb2e62106fb45708358bba0 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Tue, 2 Apr 1996 18:57:49 +0000 Subject: (diskfs_enter_cache): Don't set LC->next->prev if LC->next is null. --- libdiskfs/name-cache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libdiskfs') 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; -- cgit v1.2.3