Message ID | 1371382645-20912-1-git-send-email-sw@weilnetz.de |
---|---|
State | Accepted |
Headers | show |
Thanks, applied all of the following: kvm: Fix potential resource leak (missing fclose) savevm: Fix potential memory leak audio: Replace static functions in header file by macros, remove GCC_ATTR libcacard: Fix cppcheck warning and remove unneeded code to the trivial patch queue. /mjt
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);
This leak was detected by cppcheck. Signed-off-by: Stefan Weil <sw@weilnetz.de> --- hw/i386/kvm/pci-assign.c | 1 + 1 file changed, 1 insertion(+)