1
0
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:
Michael Chapman 2016-08-16 19:07:42 +10:00
parent 5f9a610ad2
commit 856e309d7b

View File

@ -322,6 +322,7 @@ int route_add(
} else
return r;
if (ret)
*ret = route;
return 0;