summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2016-10-18 10:01:56 +0100
committerFrediano Ziglio <fziglio@redhat.com>2016-10-20 08:26:55 +0100
commit14d0ac5fb5c541b1da8cf71718d1512713a6fd24 (patch)
tree4276deafdabf2232f3fd8f8692abd4e4d4ef682f
parentcd631b581971c6ff92d6e98a751c602d2f4113f0 (diff)
Move monitors_config_ref inside red_monitors_config_item_new
This makes red_monitors_config_item_new() and red_monitors_config_item_free() symmetric. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
-rw-r--r--server/dcc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/dcc.c b/server/dcc.c
index 6aa19779..5c05c3b1 100644
--- a/server/dcc.c
+++ b/server/dcc.c
@@ -658,7 +658,7 @@ static RedMonitorsConfigItem *red_monitors_config_item_new(RedChannel* channel,
RedMonitorsConfigItem *mci;
mci = spice_new(RedMonitorsConfigItem, 1);
- mci->monitors_config = monitors_config;
+ mci->monitors_config = monitors_config_ref(monitors_config);
red_pipe_item_init_full(&mci->pipe_item, RED_PIPE_ITEM_TYPE_MONITORS_CONFIG,
red_monitors_config_item_free);
@@ -682,7 +682,7 @@ void dcc_push_monitors_config(DisplayChannelClient *dcc)
}
mci = red_monitors_config_item_new(red_channel_client_get_channel(RED_CHANNEL_CLIENT(dcc)),
- monitors_config_ref(dc->priv->monitors_config));
+ monitors_config);
red_channel_client_pipe_add(RED_CHANNEL_CLIENT(dcc), &mci->pipe_item);
red_channel_client_push(RED_CHANNEL_CLIENT(dcc));
}