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>
This commit is contained in:
parent
ff55e94d23
commit
4c1586787f
|
@ -2413,6 +2413,7 @@ static void coroutine_fn v9fs_link(void *opaque)
|
||||||
if (!err) {
|
if (!err) {
|
||||||
err = offset;
|
err = offset;
|
||||||
}
|
}
|
||||||
|
put_fid(pdu, oldfidp);
|
||||||
out:
|
out:
|
||||||
put_fid(pdu, dfidp);
|
put_fid(pdu, dfidp);
|
||||||
out_nofid:
|
out_nofid:
|
||||||
|
|
Loading…
Reference in a new issue