about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-05-24 13:47:21 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-05-24 13:47:21 +0200
commit090732ed9605e0a038a7506c6b9d77c5bbb6a207 (patch)
treeb5f140e9e8cba5560881db14e22ca774a1e73d2a
parenta2af4c31842e36321dfc2352af7590b637f90a74 (diff)
downloadprofani-tty-090732ed9605e0a038a7506c6b9d77c5bbb6a207.tar.gz
Fix invalid read in titlebar
-rw-r--r--src/ui/titlebar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/titlebar.c b/src/ui/titlebar.c
index 9c8adfe5..915faa6a 100644
--- a/src/ui/titlebar.c
+++ b/src/ui/titlebar.c
@@ -197,9 +197,10 @@ _title_bar_draw(void)
     char *title = win_get_title(current);
 
     mvwprintw(win, 0, 0, " %s", title);
-    free(title);
     pos = strlen(title) + 1;
 
+    free(title);
+
     // presence is written from the right side
     // calculate it first so we have a maxposition
     maxrightpos = _show_self_presence();