forked from enlightenment/efl
elput: Fix null pointer dereference
Coverity reports this as a null pointer dereference, so check for 'seat' existence before comparing with strcmp Fixes CID1385369 Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
32f8e0c726
commit
382e1a8957
|
@ -523,7 +523,7 @@ _logind_connect(Elput_Manager **manager, const char *seat, unsigned int tty)
|
|||
goto seat_err;
|
||||
}
|
||||
|
||||
if (!strcmp(seat, "seat0"))
|
||||
if ((seat) && (!strcmp(seat, "seat0")))
|
||||
{
|
||||
if (!_logind_session_vt_get(em->sid, &em->vt_num))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue