From: Alexander Larsson <al...@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

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to