From 92d73827144ae539924e8744ab3469d2bd286444 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Fri, 29 Jul 2016 22:30:20 +0200 Subject: [PATCH] UPSTREAM: util/inteltool: fix memory leak A struct pci_dev was allocated but not freed. BUG=None BRANCH=None TEST=None Change-Id: Idb0beda277fac261c8feeee9d60018d15438d716 Signed-off-by: Patrick Georgi Found-by: Coverity Scan #1353037 Reviewed-on: https://review.coreboot.org/15971 Tested-by: build bot (Jenkins) Reviewed-by: Duncan Laurie Reviewed-by: Paul Menzel Reviewed-on: https://chromium-review.googlesource.com/366278 Commit-Ready: Furquan Shaikh Tested-by: Furquan Shaikh Reviewed-by: Furquan Shaikh --- util/inteltool/amb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/inteltool/amb.c b/util/inteltool/amb.c index ca6b9cd471..26bece04e3 100644 --- a/util/inteltool/amb.c +++ b/util/inteltool/amb.c @@ -439,6 +439,7 @@ int print_ambs(struct pci_dev *dev, struct pci_access *pacc) max_channel = pci_read_byte(dev16, 0x56)/max_branch; max_amb = pci_read_byte(dev16, 0x57); + pci_free_dev(dev16); break; default: