st

my customized branch of st - synced with upstream git://git.suckless.org/st
git clone git://git.jakekoroman.com/st
Log | Files | Refs | README | LICENSE

commit 5345db3c9be1a22ca19202035b881b951c2f0f9e
parent 7648697f711d5ae336af142e9cd464d943341b24
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:
Mx.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);