diff options
author | Tim Wiederhake <twied@gmx.net> | 2011-01-23 23:25:26 +0100 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2011-01-23 17:58:30 -0500 |
commit | 81bd979835fbf035f2d46907a4a68ebcd5361a7c (patch) | |
tree | c0c4c9ce126c35977dd638964ad3d9e37e533311 | |
parent | 748f672b2c294fbf5fe496256cfb59e7a19c99ea (diff) |
initialise display
fixes valgrind:
==25178== Conditional jump or move depends on uninitialised value(s)
==25178== at 0x409E2C: display_create (window.c:1582)
==25178== by 0x407A43: main (terminal.c:2323)
and
==13793== Conditional jump or move depends on uninitialised value(s)
==13793== at 0x40A2D1: display_handle_global (window.c:1504)
==13793== by 0x4E2C183: display_handle_global (wayland-client.c:281)
==13793== by 0x713FEE7: ffi_call_unix64 (in /usr/lib/libffi.so.5.0.10)
==13793== by 0x713FC83: ffi_call (in /usr/lib/libffi.so.5.0.10)
==13793== by 0x4E2C71A: wl_closure_invoke (connection.c:663)
==13793== by 0x4E2BB7B: wl_display_iterate (wayland-client.c:484)
==13793== by 0x4096CA: display_create (window.c:1664)
==13793== by 0x407A43: main (terminal.c:2321)
-rw-r--r-- | clients/window.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clients/window.c b/clients/window.c index 2944287..59ea975 100644 --- a/clients/window.c +++ b/clients/window.c @@ -1647,6 +1647,8 @@ display_create(int *argc, char **argv[], const GOptionEntry *option_entries) if (d == NULL) return NULL; + memset(d, 0, sizeof *d); + d->display = wl_display_connect(NULL); if (d->display == NULL) { fprintf(stderr, "failed to create display: %m\n"); |