]> mj.ucw.cz Git - pciutils.git/commitdiff
Memleak
authorMartin Mares <mj@ucw.cz>
Tue, 11 Oct 2005 09:27:36 +0000 (09:27 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 5 May 2006 12:18:33 +0000 (14:18 +0200)
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-87

ChangeLog
lspci.c

index 1a74bd7f16bc72e12cc3fcd0655975951198dab8..d55bf27ce8ac6e37a0c6adadabb6bb33054d3129 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-10-11  Martin Mares  <mj@ucw.cz>
+
+       * lspci.c (new_bus): Fixed a memory leak. Thanks to Paul Sangree for reporting it.
+
 2005-09-21  Martin Mares  <mj@ucw.cz>
 
        * Released as 2.2.0.
diff --git a/lspci.c b/lspci.c
index 04bbb3d9eecd7d122b27fc0fed4f9b7ad44b236f..20408a94168e26c04d9644cd7b57e6cf6315de4d 100644 (file)
--- 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;