Skip to contentSkip to conversation

pci:fix missing free

PATCH In review zhouyangchao 3 participants 6 messages Sep 23, 2016 – Oct 4, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci:fix missing free

---
 lib/librte_eal/common/eal_common_pci.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
lib/librte_eal/common/eal_common_pci.c +1 -0
index 7248c38..eb44998 100644
@@ -378,6 +378,7 @@ rte_eal_pci_detach(const struct rte_pci_addr *addr)
 			goto err_return;
 
 		TAILQ_REMOVE(&pci_device_list, dev, next);
+		free(dev);
 		return 0;
 	}
 	return -1;
Signature · 1 line
1.7.1
#2 lore raw

PATCH 1/1 pci:fix missing free

---
 lib/librte_eal/common/eal_common_pci.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
lib/librte_eal/common/eal_common_pci.c +1 -0
index 7248c38..eb44998 100644
@@ -378,6 +378,7 @@ rte_eal_pci_detach(const struct rte_pci_addr *addr)
 			goto err_return;
 
 		TAILQ_REMOVE(&pci_device_list, dev, next);
+		free(dev);
 		return 0;
 	}
 	return -1;
Signature · 1 line
1.7.1
#3 lore raw

Hello,

Quoted 18 lines · Yangchao Zhou
---
 lib/librte_eal/common/eal_common_pci.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
lib/librte_eal/common/eal_common_pci.c +1 -1
index 7248c38..eb44998 100644
@@ -378,6 +378,7 @@ rte_eal_pci_detach(const struct rte_pci_addr *addr)
                        goto err_return;
 
                TAILQ_REMOVE(&pci_device_list, dev, next);
+               free(dev);
                return 0;
        }
        return -1;
--
Quoted 2 lines

1.7.1

For the title, how about:
pci: fix memory leak when detaching devices

Afaics the fixes tag would be :

Fixes dbe6b4b61b0e ("pci: probe or close device")

+ CC stable

Signature · 1 line
David Marchand
#4 lore raw
Quoted 27 lines · David Marchand

Hello,

Quoted 18 lines · Yangchao Zhou
---
 lib/librte_eal/common/eal_common_pci.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
lib/librte_eal/common/eal_common_pci.c +1 -1
index 7248c38..eb44998 100644
@@ -378,6 +378,7 @@ rte_eal_pci_detach(const struct rte_pci_addr *addr)
                        goto err_return;
 
                TAILQ_REMOVE(&pci_device_list, dev, next);
+               free(dev);
                return 0;
        }
        return -1;
--
Quoted 2 lines

1.7.1

For the title, how about:
pci: fix memory leak when detaching devices

Quoted 5 lines

Afaics the fixes tag would be :

Fixes dbe6b4b61b0e ("pci: probe or close device")

+ CC stable

Thomas, can you apply this with my ack ?
Thanks.

Signature · 1 line
David Marchand
#5 lore raw

2016-09-30 17:27, David Marchand:

Quoted 10 lines
Quoted 8 lines · David Marchand

Hello,

Quoted 1 line · Yangchao Zhou

For the title, how about:
pci: fix memory leak when detaching devices

Quoted 8 lines
Quoted 5 lines

Afaics the fixes tag would be :

Fixes dbe6b4b61b0e ("pci: probe or close device")

+ CC stable

Thomas, can you apply this with my ack ?
Thanks.

Applied, thanks