Good evening - I'm Dr. Sara. I'm a licensed veterinarian who works exclusively with dogs and cats. I'm really sorry to hear that your pup has suffered a broken leg - but I'm glad to know that you're giving a shot at the repair!
There are definitely a lot of variables to consider when talking about broken bones. I won't be able to address this in exact detail since I haven't seen the X-rays or your pet, but I can definitely give you some ideas to discuss with your vet.
Firstly, if there's infection inside any part of the bone (and especially if it's around a metal implant like a pin or a bone plate), then things are going to be very complicated. Metal implants have what we call a "biofilm" around them - once bacteria get into the biofilm, they cannot be removed with antibiotics. The only choice is to remove the implants. In some cases, the vet is able to stabilize the broken leg with an implant in a different place, but sometimes not.
A piece of bone that has died is called a "sequestrum". A sequestrum can be caused by infection (which would be much more complicated), or it can be caused by the loss of the blood supply to that segment of bone. A sequestrum is devitalized bone and it won't hold implants or contribute at all to healing. It's in the way, most of the time, and needs to be removed. Depending on the size of the sequestrum, there may or may not be grafting available. Some smaller defects aren't an issue - as long as the fracture is appropriately stabilized around the area after the sequestrum is removed, it'll heal fine. If the sequestrum is sizeable, then your vet could consider doing a bone graft or a graft with a synthetic graft.
Fracture repairs and bone grafting are usually above the skill level of your average general vet. When I need a fracture repaired, I send my patients to a nearby specialist who does only surgery for a living. We just don't see enough fractures in our practice to become really skilled with this type of repair.
Please let me know what other questions I can handle for you :)