server: Initialise serial number counter for wl_display
authorRob Bradford <rob@linux.intel.com>
Tue, 22 May 2012 17:48:13 +0000 (18:48 +0100)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 22 May 2012 19:24:48 +0000 (15:24 -0400)
This ends up propagating through and creating a valgrind error like:

==22573== Conditional jump or move depends on uninitialised value(s)
==22573==    at 0x409E57: pointer_attach (compositor.c:1999)
==22573==    by 0x34ECE05D63: ffi_call_unix64 (unix64.S:75)
==22573==    by 0x34ECE05784: ffi_call (ffi64.c:486)
==22573==    by 0x5674C45: wl_closure_invoke (connection.c:770)
==22573==    by 0x566ECCB: wl_client_connection_data (wayland-server.c:255)
==22573==    by 0x56722F1: wl_event_source_fd_dispatch (event-loop.c:79)
==22573==    by 0x5672C91: wl_event_loop_dispatch (event-loop.c:410)
==22573==    by 0x56705F4: wl_display_run (wayland-server.c:1003)
==22573==    by 0x40C775: main (compositor.c:2937)

src/wayland-server.c

index c1be56a..6ccc097 100644 (file)
@@ -895,6 +895,7 @@ wl_display_create(void)
        wl_list_init(&display->client_list);
 
        display->id = 1;
+       display->serial = 0;
 
        if (!wl_display_add_global(display, &wl_display_interface, 
                                   display, bind_display)) {