mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-24 06:59:45 -05:00
fix memory errors
This commit is contained in:
parent
ab1a12b174
commit
4fbe322fa6
3 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue