]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/src/child.c
i3bar: Fix memory for old plain-text input (Thanks Han)
[i3/i3] / i3bar / src / child.c
index c98befba3a1ca694e24f6fcbc7b40bcf33361e2b..d5efa2aadc470303ff324a852135a19564fca4e0 100644 (file)
@@ -213,6 +213,8 @@ void stdin_io_cb(struct ev_loop *loop, ev_io *watcher, int revents) {
         free(buffer);
     } else {
         struct status_block *first = TAILQ_FIRST(&statusline_head);
+        /* Clear the old buffer if any. */
+        FREE(first->full_text);
         /* Remove the trailing newline and terminate the string at the same
          * time. */
         buffer[rec-1] = '\0';