mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 17:51:22 +03:00
networkd: avoid NULL pointer dereference in route_add
If no result parameter is provided, do not attempt to write the found/newly-created route to it. This is presently not an issue as all callers currently provide a non-NULL result parameter, however we should do this for symmetry with address_add and future code robustness.
This commit is contained in:
parent
5f9a610ad2
commit
856e309d7b
@ -322,7 +322,8 @@ int route_add(
|
||||
} else
|
||||
return r;
|
||||
|
||||
*ret = route;
|
||||
if (ret)
|
||||
*ret = route;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user