[PATCH spice-server 2/2] reds: Remove leak allocating migration state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/reds.c | 2 +-
 server/reds.h | 4 ----
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/server/reds.c b/server/reds.c
index 6c8e06959..344f79916 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3378,7 +3378,7 @@ SPICE_GNUC_VISIBLE int spice_server_add_interface(SpiceServer *reds,
             return -1;
         }
         reds->migration_interface = SPICE_CONTAINEROF(sin, SpiceMigrateInstance, base);
-        reds->migration_interface->st = spice_new0(SpiceMigrateState, 1);
+        reds->migration_interface->st = (SpiceMigrateState *)(intptr_t)1; // dummy pointer
     }
 
     return 0;
diff --git a/server/reds.h b/server/reds.h
index 4f5fc28c3..cea002c51 100644
--- a/server/reds.h
+++ b/server/reds.h
@@ -35,10 +35,6 @@ static inline QXLInterface * qxl_get_interface(QXLInstance *qxl)
     return SPICE_CONTAINEROF(qxl->base.sif, QXLInterface, base);
 }
 
-struct SpiceMigrateState {
-    int dummy;
-};
-
 /* main thread only */
 void reds_handle_channel_event(RedsState *reds, int event, SpiceChannelEventInfo *info);
 
-- 
2.13.6

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]