|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] transmitter: Fix cleanup teardown in TransmitterInitialize
Using "while (--Index > 0)" will miss tearing down the last ring.
Index is a signed LONG so using a >= 0 comparison is safe in this
context.
Signed-off-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
---
src/xenvif/transmitter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/xenvif/transmitter.c b/src/xenvif/transmitter.c
index 88dfb60..41d0f3c 100644
--- a/src/xenvif/transmitter.c
+++ b/src/xenvif/transmitter.c
@@ -4615,7 +4615,7 @@ TransmitterInitialize(
fail7:
Error("fail7\n");
- while (--Index > 0) {
+ while (--Index >= 0) {
PXENVIF_TRANSMITTER_RING Ring = (*Transmitter)->Ring[Index];
(*Transmitter)->Ring[Index] = NULL;
--
2.54.0.windows.1
--
Ngoc Tu Dinh | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |