summaryrefslogtreecommitdiff
path: root/src/lib/elput/elput_logind.c
diff options
context:
space:
mode:
authorBenjamin Jacobs <benj@spam.thsi.be>2016-06-07 09:42:49 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-06-07 09:43:01 -0400
commitad2e21b02399c02a748bb8b8ab0dc10f85e6662d (patch)
treef36502f03af322dbb0defa13fad532683130a069 /src/lib/elput/elput_logind.c
parent05732c7472fee89446a63265e32fc05277c1be85 (diff)
elput: Missing pointer initialization.
Summary: Calling free() on an uninitialized pointer leads to crash, that can occurs when sd_session_get_seat fails. Fixes T3785. Reviewers: devilhorns Subscribers: cedric, jpeg Maniphest Tasks: T3785 Differential Revision: https://phab.enlightenment.org/D4015 @fix
Diffstat (limited to 'src/lib/elput/elput_logind.c')
-rw-r--r--src/lib/elput/elput_logind.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/elput/elput_logind.c b/src/lib/elput/elput_logind.c
index 22cb1b02cc..799a26a10c 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)
427 if (ret < 0) 427 if (ret < 0)
428 { 428 {
429 ERR("Failed to get session seat"); 429 ERR("Failed to get session seat");
430 free(s); 430 if (s) free(s);
431 goto seat_err; 431 goto seat_err;
432 } 432 }
433 else if ((seat) && (s) && (strcmp(seat, s))) 433 else if ((seat) && (s) && (strcmp(seat, s)))