40.—(1) Every inmate shall be deemed to be in the legal custody of the approved institution in which he is for the time being detained.
[28/79]
(2) An inmate shall be deemed to be in legal custody —
(a)
while he is confined in, or is being taken to or from, an approved institution;
(b)
while he is for any other reason outside an approved institution in the custody or under the control of an officer of the approved institution; or
(c)
while he is being taken to any place to which he is required or authorised under this Act to be taken, or is kept in custody in pursuance of any such requirement or authorisation.