[Spice-commits] display/res.c

Alexander Larsson alexl at kemper.freedesktop.org
Tue Jun 29 04:04:10 PDT 2010


 display/res.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a1bb0a59a15d7f9ed1356e97a5f1a89af187154c
Author: Alexander Larsson <alexl at redhat.com>
Date:   Tue Jun 29 13:03:11 2010 +0200

    Fix bad memory free of cursor
    
    When freeing the chunks we freed the resource multiple times instead
    of actually freeing the chunks.

diff --git a/display/res.c b/display/res.c
index 62a8bb8..8c0f39d 100644
--- a/display/res.c
+++ b/display/res.c
@@ -2766,7 +2766,7 @@ static void FreeCursor(PDev *pdev, Resource *res)
     while (chunk_phys) {
         QXLDataChunk *chunk = (QXLDataChunk *)VA(pdev, chunk_phys, pdev->main_mem_slot);
         chunk_phys = chunk->next_chunk;
-        FreeMem(pdev, res);
+        FreeMem(pdev, chunk);
         ONDBG(pdev->Res.num_cursor_pages--);
     }
 


More information about the Spice-commits mailing list