ceph: fix dangling pointer
Clear fi->last_name when it's freed. The only caller is rewinddir() (or equivalent lseek). Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
c5c6b19d4b
commit
a1629c3b24
@ -414,6 +414,7 @@ static void reset_readdir(struct ceph_file_info *fi)
|
||||
fi->last_readdir = NULL;
|
||||
}
|
||||
kfree(fi->last_name);
|
||||
fi->last_name = NULL;
|
||||
fi->next_offset = 2; /* compensate for . and .. */
|
||||
if (fi->dentry) {
|
||||
dput(fi->dentry);
|
||||
|
Loading…
x
Reference in New Issue
Block a user