mirror of
https://github.com/swaywm/sway.git
synced 2025-11-25 06:59:48 -05:00
cleanup
This commit is contained in:
parent
a4c1270ef0
commit
63f7fb9517
3 changed files with 9 additions and 4 deletions
|
|
@ -14,6 +14,7 @@ struct seat_config *new_seat_config(const char* name) {
|
|||
sway_log(L_DEBUG, "new_seat_config(%s)", name);
|
||||
seat->name = strdup(name);
|
||||
if (!sway_assert(seat->name, "could not allocate name for seat")) {
|
||||
free(seat);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -21,6 +22,8 @@ struct seat_config *new_seat_config(const char* name) {
|
|||
seat->attachments = create_list();
|
||||
if (!sway_assert(seat->attachments,
|
||||
"could not allocate seat attachments list")) {
|
||||
free(seat->name);
|
||||
free(seat);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue