Intersection point of two linked list

code is showing runtime error please rectify

See, in the input we are particularly linking the 2 linked list , making them different and unique so there is no chance that
temp1 == temp2
it may be so that the value held by the 2 linked list are same at that point

so
inthe while condition
check
while(temp1->Data != temp2->data) {}

and also 1 more update for a optimised code ,since the input stated the no of nodes in each linked list
u need not caculate it again in the intersection function just pass n1 n2 as parameters