9pfs: fix memory leak in v9fs_link
authorLi Qiang <liqiang6-s@360.cn>
Mon, 17 Oct 2016 12:13:58 +0000 (14:13 +0200)
committerGreg Kurz <groug@kaod.org>
Mon, 17 Oct 2016 12:13:58 +0000 (14:13 +0200)
commit4c1586787ff43c9acd18a56c12d720e3e6be9f7c
tree74f1281bfd92e7555a1b3f913262dc9de6a55184
parentff55e94d23ae94c8628b0115320157c763eb3e06
9pfs: fix memory leak in v9fs_link

The v9fs_link() function keeps a reference on the source fid object. This
causes a memory leak since the reference never goes down to 0. This patch
fixes the issue.

Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Reviewed-by: Greg Kurz <groug@kaod.org>
[groug, rephrased the changelog]
Signed-off-by: Greg Kurz <groug@kaod.org>
hw/9pfs/9p.c