clipcopy: no need to check for free(NULL), set to NULL after free

This commit is contained in:
Hiltjo Posthuma 2018-03-17 13:48:10 +01:00
parent 7648697f71
commit 5345db3c9b

2
x.c
View file

@ -245,8 +245,8 @@ clipcopy(const Arg *dummy)
{
Atom clipboard;
if (xsel.clipboard != NULL)
free(xsel.clipboard);
xsel.clipboard = NULL;
if (xsel.primary != NULL) {
xsel.clipboard = xstrdup(xsel.primary);