Commit 040d159
ceph: fix memory leaks in ceph_mdsc_build_path()
Add __putname() calls to error code paths that did not free the "path"
pointer obtained by __getname(). If ownership of this pointer is not
passed to the caller via path_info.path, the function must free it
before returning.
Cc: [email protected]
Fixes: 3fd945a ("ceph: encode encrypted name in ceph_mdsc_build_path and dentry release")
Fixes: 550f7ca ("ceph: give up on paths longer than PATH_MAX")
Signed-off-by: Max Kellermann <[email protected]>
Reviewed-by: Viacheslav Dubeyko <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>1 parent 43323a5 commit 040d159
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2768 | 2768 | | |
2769 | 2769 | | |
2770 | 2770 | | |
| 2771 | + | |
2771 | 2772 | | |
2772 | 2773 | | |
2773 | 2774 | | |
| |||
2777 | 2778 | | |
2778 | 2779 | | |
2779 | 2780 | | |
| 2781 | + | |
2780 | 2782 | | |
2781 | 2783 | | |
2782 | 2784 | | |
| |||
2813 | 2815 | | |
2814 | 2816 | | |
2815 | 2817 | | |
| 2818 | + | |
2816 | 2819 | | |
2817 | 2820 | | |
2818 | 2821 | | |
| |||
0 commit comments