[hackers] [surf] The check for NULL is not necessary before free. || Christoph Lohmann

From: <git_AT_suckless.org>
Date: Thu, 06 Feb 2014 16:52:43 +0100

commit 637902b452c723e8d5fdb714e8a38861e9c9f64e
Author: Christoph Lohmann <20h_AT_r-36.net>
Date: Thu Feb 6 16:49:26 2014 +0100

    The check for NULL is not necessary before free.

diff --git a/surf.c b/surf.c
index 1ec4c62..2e9c38d 100644
--- a/surf.c
+++ b/surf.c
_AT_@ -685,8 +685,7 @@ loaduri(Client *c, const Arg *arg) {
                 c->title = copystr(&c->title, u);
                 updatetitle(c);
         }
- if(u != NULL)
- g_free(u);
+ g_free(u);
 }
 
 static void
Received on Thu Feb 06 2014 - 16:52:43 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 06 2014 - 17:00:12 CET