Skip to content
Commit 81c99089 authored by Dominique Martinet's avatar Dominique Martinet
Browse files

v9fs_dir_readdir: fix double-free on p9stat_read error

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: default avatarDominique Martinet <dominique.martinet@cea.fr>
Reported-by: default avatar <syzbot+d4252148d198410b864f@syzkaller.appspotmail.com>
parent 2f9ad0ac
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment