diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2018-03-17 13:48:10 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2018-03-17 13:48:10 +0100 |
commit | 5345db3c9be1a22ca19202035b881b951c2f0f9e (patch) | |
tree | f12320b20db9f94ef93e49d3d411007241f4b176 | |
parent | 7648697f711d5ae336af142e9cd464d943341b24 (diff) | |
download | st-5345db3c9be1a22ca19202035b881b951c2f0f9e.tar.gz |
clipcopy: no need to check for free(NULL), set to NULL after free
-rw-r--r-- | x.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |