mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
xcursor/wlr_xcursor: properly clean xcursor in case of realloc failure in load_callback
This commit is contained in:
parent
75ecba444a
commit
8221c487ed
1 changed files with 1 additions and 1 deletions
|
|
@ -187,7 +187,7 @@ static void load_callback(struct xcursor_images *images, void *data) {
|
||||||
theme->cursor_count * sizeof(theme->cursors[0]));
|
theme->cursor_count * sizeof(theme->cursors[0]));
|
||||||
if (cursors == NULL) {
|
if (cursors == NULL) {
|
||||||
theme->cursor_count--;
|
theme->cursor_count--;
|
||||||
free(cursor);
|
xcursor_destroy(cursor);
|
||||||
} else {
|
} else {
|
||||||
theme->cursors = cursors;
|
theme->cursors = cursors;
|
||||||
theme->cursors[theme->cursor_count - 1] = cursor;
|
theme->cursors[theme->cursor_count - 1] = cursor;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue