[Spice-devel] [PATCH 7/9] server/dispatchers: initialize stack to 0 for valgrind
Alon Levy
alevy at redhat.com
Fri May 17 08:08:12 PDT 2013
---
server/main_dispatcher.c | 2 +-
server/red_dispatcher.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/server/main_dispatcher.c b/server/main_dispatcher.c
index 92b0791..e7a451a 100644
--- a/server/main_dispatcher.c
+++ b/server/main_dispatcher.c
@@ -78,7 +78,7 @@ static void main_dispatcher_handle_channel_event(void *opaque,
void main_dispatcher_channel_event(int event, SpiceChannelEventInfo *info)
{
- MainDispatcherChannelEventMessage msg;
+ MainDispatcherChannelEventMessage msg = {0,};
if (pthread_self() == main_dispatcher.base.self) {
main_dispatcher_self_handle_channel_event(event, info);
diff --git a/server/red_dispatcher.c b/server/red_dispatcher.c
index f4b140c..ef47c28 100644
--- a/server/red_dispatcher.c
+++ b/server/red_dispatcher.c
@@ -97,7 +97,7 @@ static void red_dispatcher_set_display_peer(RedChannel *channel, RedClient *clie
int num_common_caps, uint32_t *common_caps, int num_caps,
uint32_t *caps)
{
- RedWorkerMessageDisplayConnect payload;
+ RedWorkerMessageDisplayConnect payload = {0,};
RedDispatcher *dispatcher;
spice_debug("%s", "");
@@ -159,7 +159,7 @@ static void red_dispatcher_set_cursor_peer(RedChannel *channel, RedClient *clien
uint32_t *common_caps, int num_caps,
uint32_t *caps)
{
- RedWorkerMessageCursorConnect payload;
+ RedWorkerMessageCursorConnect payload = {0,};
RedDispatcher *dispatcher = (RedDispatcher *)channel->data;
spice_printerr("");
payload.client = client;
@@ -292,7 +292,7 @@ static void red_dispatcher_update_area(RedDispatcher *dispatcher, uint32_t surfa
QXLRect *qxl_area, QXLRect *qxl_dirty_rects,
uint32_t num_dirty_rects, uint32_t clear_dirty_region)
{
- RedWorkerMessageUpdate payload;
+ RedWorkerMessageUpdate payload = {0,};
payload.surface_id = surface_id;
payload.qxl_area = qxl_area;
@@ -522,7 +522,7 @@ static void
red_dispatcher_create_primary_surface_sync(RedDispatcher *dispatcher, uint32_t surface_id,
QXLDevSurfaceCreate *surface)
{
- RedWorkerMessageCreatePrimarySurface payload;
+ RedWorkerMessageCreatePrimarySurface payload = {0,};
dispatcher->surface_create = *surface;
payload.surface_id = surface_id;
--
1.8.2.1
More information about the Spice-devel
mailing list