Just in case one needs a clean up.
Resolves: https://issues.redhat.com/browse/RHEL-50968
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
if (virNetworkObjIsActive(obj))
virNetworkObjPortForEach(obj, networkUpdatePort, obj);
- /* Try and read dnsmasq pids of active networks */
- if (virNetworkObjIsActive(obj) && def->ips && (def->nips > 0)) {
+ /* Try and read dnsmasq pids of both active and inactive networks, just in
+ * case a network became inactive and we need to clean up. */
+ if (def->ips && (def->nips > 0)) {
const char *binpath = NULL;
pid_t dnsmasqPid;