[Spice-devel] [PATCH 2/5] server: Don't leak QUIC image chunks

alexl at redhat.com alexl at redhat.com
Tue Sep 21 11:19:02 PDT 2010


From: Alexander Larsson <alexl at redhat.com>

red_put_image() needs to free the chunks for QUIC images, as we
allocate these when creating the image.
---
 server/red_parse_qxl.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/server/red_parse_qxl.c b/server/red_parse_qxl.c
index 5b32f6b..ab01d63 100644
--- a/server/red_parse_qxl.c
+++ b/server/red_parse_qxl.c
@@ -412,6 +412,9 @@ void red_put_image(SpiceImage *red)
         }
         spice_chunks_destroy(red->u.bitmap.data);
         break;
+    case SPICE_IMAGE_TYPE_QUIC:
+        spice_chunks_destroy(red->u.quic.data);
+        break;
     }
     free(red);
 }
-- 
1.7.2.2



More information about the Spice-devel mailing list