aboutsummaryrefslogtreecommitdiffstats
path: root/sway/config
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-20 06:12:08 -0500
committerLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-20 06:12:08 -0500
commit63f7fb95172a72436698a1562b4f7ea1e9100a7e (patch)
tree7b1191368f446c7ee24ce41eb36d0cd3a86a6c35 /sway/config
parentfix memory leak in swaymsg (diff)
downloadsway-63f7fb95172a72436698a1562b4f7ea1e9100a7e.tar.gz
sway-63f7fb95172a72436698a1562b4f7ea1e9100a7e.tar.zst
sway-63f7fb95172a72436698a1562b4f7ea1e9100a7e.zip
cleanup
Diffstat (limited to 'sway/config')
-rw-r--r--sway/config/seat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/config/seat.c b/sway/config/seat.c
index 4c9e8d0d..113139e8 100644
--- a/sway/config/seat.c
+++ b/sway/config/seat.c
@@ -14,6 +14,7 @@ struct seat_config *new_seat_config(const char* name) {
14 sway_log(L_DEBUG, "new_seat_config(%s)", name); 14 sway_log(L_DEBUG, "new_seat_config(%s)", name);
15 seat->name = strdup(name); 15 seat->name = strdup(name);
16 if (!sway_assert(seat->name, "could not allocate name for seat")) { 16 if (!sway_assert(seat->name, "could not allocate name for seat")) {
17 free(seat);
17 return NULL; 18 return NULL;
18 } 19 }
19 20
@@ -21,6 +22,8 @@ struct seat_config *new_seat_config(const char* name) {
21 seat->attachments = create_list(); 22 seat->attachments = create_list();
22 if (!sway_assert(seat->attachments, 23 if (!sway_assert(seat->attachments,
23 "could not allocate seat attachments list")) { 24 "could not allocate seat attachments list")) {
25 free(seat->name);
26 free(seat);
24 return NULL; 27 return NULL;
25 } 28 }
26 29