Does "leave" mean the same thing in these two sentences?

He took his leave.

The applicant now seeks leave to appeal and, if leave be granted, to appeal against these sentences.
different meanings