Ignore:
Timestamp:
2018-12-11T15:46:31Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c9c1ccd
Parents:
10b21a1b
Message:

Fix window reference leak in compositor.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/compositor/compositor.c

    r10b21a1b r737ebf3  
    224224
    225225        link_initialize(&win->link);
     226        /* One initial reference will be for being in the window list */
    226227        refcount_init(&win->ref_cnt);
    227228        prodcons_initialize(&win->queue);
     
    241242static void window_destroy(window_t *win)
    242243{
    243         if (!win || !refcount_down(&win->ref_cnt))
     244        if (win == NULL)
     245                return;
     246
     247        if (!refcount_down(&win->ref_cnt))
    244248                return;
    245249
     
    891895                    0, 0, width, height, win->transform, &x, &y, &width, &height);
    892896        }
     897
     898        /* Down refcount for removing from the window list */
     899        window_destroy(win);
    893900
    894901        comp_damage(x, y, width, height);
Note: See TracChangeset for help on using the changeset viewer.