Blame SOURCES/0003-reds-Remove-leak-allocating-migration-state.patch

ad1357
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
ad1357
From: Frediano Ziglio <fziglio@redhat.com>
ad1357
Date: Tue, 19 Sep 2017 08:28:02 +0100
ad1357
Subject: [spice-server] reds: Remove leak allocating migration state
ad1357
ad1357
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
ad1357
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
ad1357
---
ad1357
 server/reds.c | 2 +-
ad1357
 server/reds.h | 4 ----
ad1357
 2 files changed, 1 insertion(+), 5 deletions(-)
ad1357
ad1357
diff --git a/server/reds.c b/server/reds.c
ad1357
index 12c33570a..1b1ab94ea 100644
ad1357
--- a/server/reds.c
ad1357
+++ b/server/reds.c
ad1357
@@ -3378,7 +3378,7 @@ SPICE_GNUC_VISIBLE int spice_server_add_interface(SpiceServer *reds,
ad1357
             return -1;
ad1357
         }
ad1357
         reds->migration_interface = SPICE_CONTAINEROF(sin, SpiceMigrateInstance, base);
ad1357
-        reds->migration_interface->st = spice_new0(SpiceMigrateState, 1);
ad1357
+        reds->migration_interface->st = (SpiceMigrateState *)(intptr_t)1; // dummy pointer
ad1357
     }
ad1357
 
ad1357
     return 0;
ad1357
diff --git a/server/reds.h b/server/reds.h
ad1357
index 4f5fc28c3..cea002c51 100644
ad1357
--- a/server/reds.h
ad1357
+++ b/server/reds.h
ad1357
@@ -35,10 +35,6 @@ static inline QXLInterface * qxl_get_interface(QXLInstance *qxl)
ad1357
     return SPICE_CONTAINEROF(qxl->base.sif, QXLInterface, base);
ad1357
 }
ad1357
 
ad1357
-struct SpiceMigrateState {
ad1357
-    int dummy;
ad1357
-};
ad1357
-
ad1357
 /* main thread only */
ad1357
 void reds_handle_channel_event(RedsState *reds, int event, SpiceChannelEventInfo *info);
ad1357