From: Stefan Weil Date: Sun, 16 Jun 2013 11:37:25 +0000 (+0200) Subject: kvm: Fix potential resource leak (missing fclose) X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~1666^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=90527d2a8bb08ca5b4774eacfdd6b8fe9671c077;p=sdk%2Femulator%2Fqemu.git kvm: Fix potential resource leak (missing fclose) This leak was detected by cppcheck. Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c index ff85590..1fb7ad4 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);