forked from enlightenment/efl
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
This commit is contained in:
parent
05732c7472
commit
ad2e21b023
|
@ -427,7 +427,7 @@ _logind_connect(Elput_Manager **manager, const char *seat, unsigned int tty)
|
|||
if (ret < 0)
|
||||
{
|
||||
ERR("Failed to get session seat");
|
||||
free(s);
|
||||
if (s) free(s);
|
||||
goto seat_err;
|
||||
}
|
||||
else if ((seat) && (s) && (strcmp(seat, s)))
|
||||
|
|
Loading…
Reference in New Issue