diff options
author | Sage Weil <sage@newdream.net> | 2010-11-11 15:24:06 -0800 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-11-11 15:24:06 -0800 |
commit | a1629c3b24f26ec1b0f534874af674a6b4c1540b (patch) | |
tree | 7b40b54486f68189cde9753aca31d8e3d8af61a2 /fs/ceph/dir.c | |
parent | c5c6b19d4b8f5431fca05f28ae9e141045022149 (diff) | |
download | kernel_samsung_crespo-a1629c3b24f26ec1b0f534874af674a6b4c1540b.zip kernel_samsung_crespo-a1629c3b24f26ec1b0f534874af674a6b4c1540b.tar.gz kernel_samsung_crespo-a1629c3b24f26ec1b0f534874af674a6b4c1540b.tar.bz2 |
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>
Diffstat (limited to 'fs/ceph/dir.c')
-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 e0a2dc6..1e11ed7 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); |