Changeset a0d4afe in mainline for uspace/srv/hid/display/idevcfg.c


Ignore:
Timestamp:
2023-01-18T16:51:44Z (15 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3e7e226
Parents:
b0ae23f
Message:

Make sure input device configuration is destroyed together with seat

When a seat is destroyed without unassigning devices first, this causes
a dangling seat pointer that would cause the display server to crash
if the corresponding device generates an event.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/display/idevcfg.c

    rb0ae23f ra0d4afe  
    4141#include "display.h"
    4242#include "idevcfg.h"
     43#include "seat.h"
    4344
    4445/** Create input device configuration entry.
     
    6162
    6263        idevcfg->svc_id = svc_id;
    63         idevcfg->seat = seat;
     64        ds_seat_add_idevcfg(seat, idevcfg);
    6465
    6566        ds_display_add_idevcfg(display, idevcfg);
     
    7576{
    7677        ds_display_remove_idevcfg(idevcfg);
     78        ds_seat_remove_idevcfg(idevcfg);
    7779        free(idevcfg);
    7880}
Note: See TracChangeset for help on using the changeset viewer.