From a48c2cf4e5a9136bf23f4d73a5fe141ebf180e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Mon, 19 Oct 2020 19:52:48 +0200 Subject: Bump liberty The bugfixes in the config parser are worth it. I might have slightly overused cstr_set(). --- big-brother.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'big-brother.c') diff --git a/big-brother.c b/big-brother.c index 323a4a9..34d584e 100644 --- a/big-brother.c +++ b/big-brother.c @@ -149,7 +149,7 @@ static void app_context_free (struct app_context *self) { str_map_free (&self->config); - free (self->current_title); + cstr_set (&self->current_title, NULL); poller_fd_reset (&self->x_event); XCloseDisplay (self->dpy); poller_free (&self->poller); @@ -207,8 +207,7 @@ update_window_title (struct app_context *ctx, char *new_title) { bool changed = !ctx->current_title != !new_title || (new_title && strcmp (ctx->current_title, new_title)); - free (ctx->current_title); - ctx->current_title = new_title; + cstr_set (&ctx->current_title, new_title); return changed; } -- cgit v1.2.3