[Spice-devel] [PATCH 1/3] Don't leak resources
alexl at redhat.com
alexl at redhat.com
Thu Sep 9 09:40:58 PDT 2010
From: Alexander Larsson <alexl at redhat.com>
Ensure we break from the release loop if num_to_release got to zero.
This fixes a leak of resources as we otherwise threw away the whole list
of things to free and started on the next one.
---
display/res.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/display/res.c b/display/res.c
index d466ce7..71b6f80 100644
--- a/display/res.c
+++ b/display/res.c
@@ -299,7 +299,8 @@ static void FlushReleaseRing(PDev *pdev)
}
}
- if (SPICE_RING_IS_EMPTY(pdev->release_ring)) {
+ if (output != 0 ||
+ SPICE_RING_IS_EMPTY(pdev->release_ring)) {
break;
}
--
1.7.0.1
More information about the Spice-devel
mailing list