diff options
author | Sage Weil <sage@newdream.net> | 2010-11-12 00:24:06 +0100 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-11-12 00:24:06 +0100 |
commit | a1629c3b24f26ec1b0f534874af674a6b4c1540b (patch) | |
tree | 7b40b54486f68189cde9753aca31d8e3d8af61a2 | |
parent | ceph: explicitly specify page alignment in network messages (diff) | |
download | linux-a1629c3b24f26ec1b0f534874af674a6b4c1540b.tar.xz linux-a1629c3b24f26ec1b0f534874af674a6b4c1540b.zip |
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>
-rw-r--r-- | fs/ceph/dir.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index e0a2dc6fcafc..1e11ed716f85 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -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); |