Giving same error

I wrote this code for this problem :-

if (l1 == NULL || l2 == NULL)
    return NULL;

Node *a = l1;
Node *b = l2;

while (a != b)
{
    a = a == NULL ? l1 : a->next;
    b = b == NULL ? l2 : b->next;
}

return a;

But I keep getting this error:-
Error !
/bin/run.sh: line 4: 17 Killed ./exe

Then a last I unlocked editorial loosing my scores but i also gave me same solution and still not working, what is the problem?