diff options
author | Rafal Mielniczuk <rafal.mielniczuk2@gmail.com> | 2012-06-30 18:33:34 +0200 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-07-01 21:04:48 -0400 |
commit | 340a4343d0755bb918b98743cbe3da9e65433d33 (patch) | |
tree | bd5599e9bb64a7387e236dcd917714c6f2f4f93b | |
parent | 8268d41410b722567aca4a8dc30f3171681350a0 (diff) |
clipboard: initialise clipboard memory after creation
In case we don't, weston segfault in clipboard_set_selection
on:
if (clipboard->source)
clipboard_source_unref(clipboard->source);
-rw-r--r-- | src/clipboard.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/clipboard.c b/src/clipboard.c index 92c8a83b..22d4b261 100644 --- a/src/clipboard.c +++ b/src/clipboard.c @@ -251,6 +251,7 @@ clipboard_create(struct weston_seat *seat) clipboard = malloc(sizeof *clipboard); if (clipboard == NULL) return NULL; + memset(clipboard, 0, sizeof *clipboard); clipboard->seat = seat; clipboard->selection_listener.notify = clipboard_set_selection; |