network/route: drop Route object even if we fail to remove the route
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 7 Jan 2024 05:41:56 +0000 (14:41 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 25 Jan 2024 07:43:44 +0000 (16:43 +0900)
commitd529b12a01ff251b0fe631e5ad6dc90f4faad8ce
tree95d209a1ed05c63b0e51af8e377ecf29eb71d021
parent74c301b9ee9479ffb5033f5ee1ec4c18ef79efa0
network/route: drop Route object even if we fail to remove the route

If we could not remove a route, then previously the corresponding
Route object was never removed, as it was freed only when we receive
remove notification from the kernel. So, we might confused that the
route still exists and being removed, and might block reconfiguring
the route.

With this change, even if we fail to remove a route, the corresponding
Route object will be freed.

This is the one for routes of 56a995fe8e50b2432ff930ed0431cc70adbe492d.
src/network/networkd-route.c