fix memory errors

This commit is contained in:
Tony Crisci 2017-08-28 11:07:54 -04:00
parent ab1a12b174
commit 4fbe322fa6
3 changed files with 3 additions and 2 deletions

View file

@ -51,6 +51,7 @@ struct wlr_cursor *wlr_cursor_init() {
cur->state = calloc(1, sizeof(struct wlr_cursor_state));
if (!cur->state) {
wlr_log(L_ERROR, "Failed to allocate wlr_cursor_state");
free(cur);
return NULL;
}