From: Rafal Mielniczuk Date: Sat, 30 Jun 2012 16:33:34 +0000 (+0200) Subject: clipboard: initialise clipboard memory after creation X-Git-Tag: 0.95.0~93 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=340a4343d0755bb918b98743cbe3da9e65433d33;p=platform%2Fupstream%2Fweston.git 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); --- diff --git a/src/clipboard.c b/src/clipboard.c index 92c8a83..22d4b26 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;