diff options
author | Dominique Martinet <dominique.martinet@cea.fr> | 2018-08-27 09:12:05 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-01 11:44:18 +0300 |
commit | 3a0e8e3587454c5f1c02b8450a4b71e517a7a1be (patch) | |
tree | c4ac98779c0981228d1f02044dc5cfaa31d8b949 /security | |
parent | 8af78a66b255b80c5ffd2c6ce3bb7f2f48ec4437 (diff) | |
download | linux-3a0e8e3587454c5f1c02b8450a4b71e517a7a1be.tar.xz |
v9fs_dir_readdir: fix double-free on p9stat_read error
commit 81c99089bce693b94b775b6eb888115d2d540086 upstream.
p9stat_read will call p9stat_free on error, we should only free the
struct content on success.
There also is no need to "p9stat_init" st as the read function will
zero the whole struct for us anyway, so clean up the code a bit while
we are here.
Link: http://lkml.kernel.org/r/1535410108-20650-1-git-send-email-asmadeus@codewreck.org
Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
Reported-by: syzbot+d4252148d198410b864f@syzkaller.appspotmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions