--- server/red-replay-qxl.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c index 7eddaf4..9c3df70 100644 --- a/server/red-replay-qxl.c +++ b/server/red-replay-qxl.c @@ -1220,7 +1220,7 @@ SPICE_GNUC_VISIBLE QXLCommandExt* spice_replay_next_cmd(SpiceReplay *replay, replay_handle_dev_input(worker, replay, type); } } - cmd = g_new(QXLCommandExt, 1); + cmd = replay_malloc0(replay, sizeof(QXLCommandExt)); cmd->cmd.type = type; cmd->group_id = 0; spice_debug("command %"PRIu64", %d\r", timestamp, cmd->cmd.type); @@ -1275,9 +1275,6 @@ error: g_list_free_full(replay->allocated, free); replay->allocated = NULL; } - if (cmd) { - g_free(cmd); - } return NULL; } -- 2.7.4 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel