diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libsystemd-network/sd-dhcp6-lease.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsystemd-network/sd-dhcp6-lease.c b/src/libsystemd-network/sd-dhcp6-lease.c index e2715ea659..8960fac92f 100644 --- a/src/libsystemd-network/sd-dhcp6-lease.c +++ b/src/libsystemd-network/sd-dhcp6-lease.c @@ -110,9 +110,11 @@ int dhcp6_lease_set_preference(sd_dhcp6_lease *lease, uint8_t preference) { } int dhcp6_lease_get_preference(sd_dhcp6_lease *lease, uint8_t *preference) { - assert_return(lease, -EINVAL); assert_return(preference, -EINVAL); + if (!lease) + return -EINVAL; + *preference = lease->preference; return 0; |