|
|
9ae3a8 |
From 803bf1ab08aadf547f8e45f0a727c17bb2b96ca5 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Alex Williamson <alex.williamson@redhat.com>
|
|
|
9ae3a8 |
Date: Fri, 1 Nov 2013 19:50:32 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 02/25] kvm: Fix potential resource leak (missing fclose)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Alex Williamson <alex.williamson@redhat.com>
|
|
|
9ae3a8 |
Message-id: <20131101195032.25461.97296.stgit@bling.home>
|
|
|
9ae3a8 |
Patchwork-id: 55234
|
|
|
9ae3a8 |
O-Subject: [RHEL7 qemu-kvm PATCH 2/3] kvm: Fix potential resource leak (missing fclose)
|
|
|
9ae3a8 |
Bugzilla: 1025877
|
|
|
9ae3a8 |
RH-Acked-by: Bandan Das <bsd@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Orit Wasserman <owasserm@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
From: Stefan Weil <sw@weilnetz.de>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Bugzilla: 1025877
|
|
|
9ae3a8 |
Upstream commit: 90527d2a8bb08ca5b4774eacfdd6b8fe9671c077
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
This leak was detected by cppcheck.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Stefan Weil <sw@weilnetz.de>
|
|
|
9ae3a8 |
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/i386/kvm/pci-assign.c | 1 +
|
|
|
9ae3a8 |
1 file changed, 1 insertion(+)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/i386/kvm/pci-assign.c | 1 +
|
|
|
9ae3a8 |
1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c
|
|
|
9ae3a8 |
index 221a8f7..a5885b4 100644
|
|
|
9ae3a8 |
--- a/hw/i386/kvm/pci-assign.c
|
|
|
9ae3a8 |
+++ b/hw/i386/kvm/pci-assign.c
|
|
|
9ae3a8 |
@@ -548,6 +548,7 @@ static int get_real_id(const char *devpath, const char *idname, uint16_t *val)
|
|
|
9ae3a8 |
if (fscanf(f, "%li\n", &id) == 1) {
|
|
|
9ae3a8 |
*val = id;
|
|
|
9ae3a8 |
} else {
|
|
|
9ae3a8 |
+ fclose(f);
|
|
|
9ae3a8 |
return -1;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
fclose(f);
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|