diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-09-09 17:58:07 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-09-09 17:58:07 +0200 |
commit | febcbbc2149d4ed0a86fc38440067413e12a1193 (patch) | |
tree | d4ac0919f8514c3279cc13bcfc1a2935645dae29 | |
parent | 19225bc297c008a7f30a6219f7a7b7ee2496caa5 (diff) |
Don't leak resources
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.
-rw-r--r-- | 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; } |