mirror of
https://github.com/LukeSmithxyz/st.git
synced 2024-11-22 15:25:58 +01:00
clipcopy: no need to check for free(NULL), set to NULL after free
This commit is contained in:
parent
7648697f71
commit
5345db3c9b
1 changed files with 2 additions and 2 deletions
2
x.c
2
x.c
|
@ -245,8 +245,8 @@ clipcopy(const Arg *dummy)
|
||||||
{
|
{
|
||||||
Atom clipboard;
|
Atom clipboard;
|
||||||
|
|
||||||
if (xsel.clipboard != NULL)
|
|
||||||
free(xsel.clipboard);
|
free(xsel.clipboard);
|
||||||
|
xsel.clipboard = NULL;
|
||||||
|
|
||||||
if (xsel.primary != NULL) {
|
if (xsel.primary != NULL) {
|
||||||
xsel.clipboard = xstrdup(xsel.primary);
|
xsel.clipboard = xstrdup(xsel.primary);
|
||||||
|
|
Loading…
Reference in a new issue