diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2020-10-19 19:52:48 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2020-10-19 19:54:14 +0200 |
commit | a48c2cf4e5a9136bf23f4d73a5fe141ebf180e1a (patch) | |
tree | 0123372f6992d504ed2311abfee111a31d1a8613 /big-brother.c | |
parent | f79a8d38fb97443e6c64196b084253c96fd0391c (diff) | |
download | desktop-tools-a48c2cf4e5a9136bf23f4d73a5fe141ebf180e1a.tar.gz desktop-tools-a48c2cf4e5a9136bf23f4d73a5fe141ebf180e1a.tar.xz desktop-tools-a48c2cf4e5a9136bf23f4d73a5fe141ebf180e1a.zip |
Bump liberty
The bugfixes in the config parser are worth it.
I might have slightly overused cstr_set().
Diffstat (limited to 'big-brother.c')
-rw-r--r-- | big-brother.c | 5 |
1 files changed, 2 insertions, 3 deletions
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; } |