提交 a1629c3b 编写于 作者: S Sage Weil

ceph: fix dangling pointer

Clear fi->last_name when it's freed.  The only caller is rewinddir() (or
equivalent lseek).
Signed-off-by: NSage Weil <sage@newdream.net>
上级 c5c6b19d
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册