diff options
author | Stefan Weil <sw@weilnetz.de> | 2013-06-16 13:37:25 +0200 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2013-06-21 22:52:50 +0400 |
commit | 90527d2a8bb08ca5b4774eacfdd6b8fe9671c077 (patch) | |
tree | eebfed3251432509d4e63e00544441f7760f88d7 | |
parent | 7c30f65703fc4698ea9794126f1b978f34ac93b9 (diff) |
kvm: Fix potential resource leak (missing fclose)
This leak was detected by cppcheck.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r-- | hw/i386/kvm/pci-assign.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c index ff855904ba..1fb7ad44ab 100644 --- a/hw/i386/kvm/pci-assign.c +++ b/hw/i386/kvm/pci-assign.c @@ -548,6 +548,7 @@ static int get_real_id(const char *devpath, const char *idname, uint16_t *val) if (fscanf(f, "%li\n", &id) == 1) { *val = id; } else { + fclose(f); return -1; } fclose(f); |