clipcopy: no need to check for free(NULL), set to NULL after free - st - Personal fork of st
 (HTM) git clone git://git.drkhsh.at/st.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 5345db3c9be1a22ca19202035b881b951c2f0f9e
 (DIR) parent 7648697f711d5ae336af142e9cd464d943341b24
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Sat, 17 Mar 2018 13:48:10 +0100
       
       clipcopy: no need to check for free(NULL), set to NULL after free
       
       Diffstat:
         M x.c                                 |       4 ++--
       
       1 file changed, 2 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git 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);