aboutsummaryrefslogtreecommitdiff
path: root/x.c
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 /x.c
parent7648697f711d5ae336af142e9cd464d943341b24 (diff)
downloadst-patched-5345db3c9be1a22ca19202035b881b951c2f0f9e.tar.bz2
st-patched-5345db3c9be1a22ca19202035b881b951c2f0f9e.tar.xz
st-patched-5345db3c9be1a22ca19202035b881b951c2f0f9e.zip
clipcopy: no need to check for free(NULL), set to NULL after free
Diffstat (limited to 'x.c')
-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)
245{ 245{
246 Atom clipboard; 246 Atom clipboard;
247 247
248 if (xsel.clipboard != NULL) 248 free(xsel.clipboard);
249 free(xsel.clipboard); 249 xsel.clipboard = NULL;
250 250
251 if (xsel.primary != NULL) { 251 if (xsel.primary != NULL) {
252 xsel.clipboard = xstrdup(xsel.primary); 252 xsel.clipboard = xstrdup(xsel.primary);