Mark the brake pipes to the master cylinder with tags to aid refitting, then uncouple them.
If a master cylinder is leaking replace it. The cylinder is usually mounted on the bulkhead sepa...