From 63f7fb95172a72436698a1562b4f7ea1e9100a7e Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Wed, 20 Dec 2017 06:12:08 -0500 Subject: cleanup --- sway/config/seat.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sway/config') 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) { 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; } -- cgit v1.2.3