summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdiskfs/lookup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libdiskfs/lookup.c b/libdiskfs/lookup.c
index 71d8dbf8..bc61f4ba 100644
--- a/libdiskfs/lookup.c
+++ b/libdiskfs/lookup.c
@@ -95,7 +95,8 @@ diskfs_lookup (struct node *dp, char *name, enum lookup_type type,
if (name[0] == '\0')
{
- diskfs_null_dirstat (ds);
+ if (ds)
+ diskfs_null_dirstat (ds);
return EINVAL;
}