diff options
| author | Li Qiang | 2017-03-27 21:13:19 +0200 |
|---|---|---|
| committer | Greg Kurz | 2017-03-27 21:13:19 +0200 |
| commit | d63fb193e71644a073b77ff5ac6f1216f2f6cf6e (patch) | |
| tree | ecfdb579e3ae334cb753342c688058ba5bedc928 /block/commit.c | |
| parent | Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (diff) | |
| download | qemu-d63fb193e71644a073b77ff5ac6f1216f2f6cf6e.tar.gz qemu-d63fb193e71644a073b77ff5ac6f1216f2f6cf6e.tar.xz qemu-d63fb193e71644a073b77ff5ac6f1216f2f6cf6e.zip | |
9pfs: fix file descriptor leak
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: Li Qiang <liqiang6-s@360.cn>
(reworded the changelog, Greg Kurz)
Signed-off-by: Greg Kurz <groug@kaod.org>
Diffstat (limited to 'block/commit.c')
0 files changed, 0 insertions, 0 deletions
