From f23fd3fcae4ab4053773a9b126a8e531f91ff499 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Tue, 11 Oct 2005 09:27:36 +0000 Subject: [PATCH] Memleak git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-87 --- ChangeLog | 4 ++++ lspci.c | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1a74bd7..d55bf27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-10-11 Martin Mares + + * lspci.c (new_bus): Fixed a memory leak. Thanks to Paul Sangree for reporting it. + 2005-09-21 Martin Mares * Released as 2.2.0. diff --git a/lspci.c b/lspci.c index 04bbb3d..20408a9 100644 --- a/lspci.c +++ b/lspci.c @@ -1883,8 +1883,6 @@ static struct bus * new_bus(struct bridge *b, unsigned int domain, unsigned int n) { struct bus *bus = xmalloc(sizeof(struct bus)); - - bus = xmalloc(sizeof(struct bus)); bus->domain = domain; bus->number = n; bus->sibling = b->first_bus; -- 2.39.2