]> git.puffer.fish Git - mirror/frr.git/commitdiff
pathd: Fix unlock of non-locked mutex
authorDonald Sharp <sharpd@nvidia.com>
Mon, 4 Jan 2021 12:54:06 +0000 (07:54 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 4 Jan 2021 12:54:06 +0000 (07:54 -0500)
We have several instances of a non-locked mutex being unlocked
in path_zebra_router_id_update.  Clean this up.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
pathd/path_zebra.c

index f0a22e4392804f623b5e381038d2030714e15af1..276bc9289c4d8be5d1356b410551826292c8034d 100644 (file)
@@ -153,12 +153,10 @@ static int path_zebra_router_id_update(ZAPI_CALLBACK_ARGS)
                pthread_mutex_unlock(&g_router_id_v6_mtx);
                family = "IPv6";
        } else {
-               pthread_mutex_unlock(&g_router_id_v4_mtx);
                zlog_warn("Unexpected router ID address family for vrf %u: %u",
                          vrf_id, pref.family);
                return 0;
        }
-       pthread_mutex_unlock(&g_router_id_v4_mtx);
        zlog_info("%s Router Id updated for VRF %u: %s", family, vrf_id, buf);
        return 0;
 }