If num is greater than the list length, then it will fail.

while ( current != NULL && counter != num-1 )