• L
    9pfs: fix file descriptor leak · d63fb193
    Li Qiang 提交于
    The v9fs_create() and v9fs_lcreate() functions are used to create a file
    on the backend and to associate it to a fid. The fid shouldn't be already
    in-use, otherwise both functions may silently leak a file descriptor or
    allocated memory. The current code doesn't check that.
    
    This patch ensures that the fid isn't already associated to anything
    before using it.
    Signed-off-by: NLi Qiang <liqiang6-s@360.cn>
    (reworded the changelog, Greg Kurz)
    Signed-off-by: NGreg Kurz <groug@kaod.org>
    d63fb193
9p.c 92.5 KB