From 09fc4e7b681260b0578145979b3b924fa6c59f05 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 7 Jun 2016 12:09:20 -0400 Subject: [PATCH] Revert "elput: Missing pointer initialization." Reverting this as the initialization of char *s was already set to NULL in a previous patch, so the 'if (s)' check here is pointless really as 'man 3 free' says passing NULL to free() is ok. This reverts commit ad2e21b02399c02a748bb8b8ab0dc10f85e6662d. --- src/lib/elput/elput_logind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elput/elput_logind.c b/src/lib/elput/elput_logind.c index 799a26a..22cb1b0 100644 --- a/src/lib/elput/elput_logind.c +++ b/src/lib/elput/elput_logind.c @@ -427,7 +427,7 @@ _logind_connect(Elput_Manager **manager, const char *seat, unsigned int tty) if (ret < 0) { ERR("Failed to get session seat"); - if (s) free(s); + free(s); goto seat_err; } else if ((seat) && (s) && (strcmp(seat, s))) -- 2.7.4