aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2018-03-17 13:48:10 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2018-03-17 13:48:10 +0100
commit5345db3c9be1a22ca19202035b881b951c2f0f9e (patch)
treef12320b20db9f94ef93e49d3d411007241f4b176
parent7648697f711d5ae336af142e9cd464d943341b24 (diff)
clipcopy: no need to check for free(NULL), set to NULL after free
-rw-r--r--x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/x.c b/x.c
index d0b26ac..12bc86b 100644
--- 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);