st
simple terminal
git clone https://9o.is/git/st.git
commit 21fb001352484e27f0043b64c52046e93c856a32 parent 66368199eceb25cf0c50742d68534bdc89785395 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 17 Mar 2018 13:48:10 +0100 clipcopy: no need to check for free(NULL), set to NULL after free Diffstat:
| M | x.c | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/x.c b/x.c @@ -245,8 +245,8 @@ clipcopy(const Arg *dummy) { Atom clipboard; - if (xsel.clipboard != NULL) - free(xsel.clipboard); + free(xsel.clipboard); + xsel.clipboard = NULL; if (xsel.primary != NULL) { xsel.clipboard = xstrdup(xsel.primary);