From b8d5ca85d9a6e6f42b8dbd6d47cab7bbcffeea90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Courr=C3=A8ges-Anglas?= Date: Fri, 3 Jan 2014 22:18:51 +0100 Subject: if (ptr) free(ptr) is not a good idiom. --- src/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index ab1f592..f8d3fed 100644 --- a/src/main.c +++ b/src/main.c @@ -297,8 +297,7 @@ handler (Display *d, XErrorEvent *e) /* If there is already an error to report, replace it with this new one. */ - if (rp_error_msg) - free (rp_error_msg); + free (rp_error_msg); rp_error_msg = xstrdup (error_msg); return 0; -- cgit v1.2.3