diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c index cedaf47cf8e..82f9047ff61 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -322,7 +322,8 @@ int route_add( } else return r; - *ret = route; + if (ret) + *ret = route; return 0; }