Well, the most glaring issue is that now you have absolutely nothing to donate to an OOG diver. Not only is he out of gas, but now his only source of gas is now entirely unreachable until you can plug him in. Which may or may not be feasible in a timely manner. You're relying on your ability to, in a potentially high stress situation, remove your octo from wherever it's stowed, disconnect your locked QD (because an unlocked QD shouldn't even be an option), stow your octo again somewhere, disconnect his locked QD, and plug in and lock your QD to his mask. All while he doesn't have anything to breathe at all. And that's all assuming you're in calm water with great viz and you both have your buoyancy dialed in, not dealing with gloves, etc. What if you're bouncing around due to surge? What about current pushing you apart? What if your QD won't latch? What if he's panicking? What if you disconnect and he inhales water? Those are a lot of "what if's" to be dealing with without an available gas source for your buddy to breathe.
You could solve the water ingress on his side by using a DESO-type QD like a QC6, but I wouldn't be surprised if the size and weight caused you both to remove them from your masks almost immediately. BOV's are connected to hoses and the QD's are mid-hose between the bailout bottle side and the BOV side. A male and female QC6 set is about 4 inches long. Imagine that sticking out the side of your mask. Omniswivels are shorter, but they're not DESO, so you don't want to be disconnecting them underwater.
You should never be disconnecting a QD if there's not another source of gas to breathe. You're betting someone else's life on you and your gear being able to execute a plan perfectly, without any sort of backup. The best answer is to donate normally and your buddy goes to a half mask after he has secured gas. It's far safer and much less complicated. Get an Omniswivel locking QD so you can easily separate the mask from your gear on land, but underwater connecting and disconnecting to donate gas in a sporting scenario is a really bad idea. Even more so on a technical dive.