diff options
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r-- | src/libsystemd-network/sd-dhcp-lease.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd-network/sd-dhcp-lease.c b/src/libsystemd-network/sd-dhcp-lease.c index 648e6e2159..acdcca87ec 100644 --- a/src/libsystemd-network/sd-dhcp-lease.c +++ b/src/libsystemd-network/sd-dhcp-lease.c @@ -330,12 +330,13 @@ static int deserialize_addresses(struct in_addr **addresses, size_t *size, const new_addresses = realloc(*addresses, (*size + 1) * sizeof(struct in_addr)); if (!new_addresses) return -ENOMEM; + else + *addresses = new_addresses; r = inet_aton(word, &(new_addresses[*size])); if (r < 0) continue; - *addresses = new_addresses; (*size)++; } |