summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/network-internal.c
diff options
context:
space:
mode:
authorSusant Sahani <susant@redhat.com>2014-06-30 01:09:08 +0530
committerTom Gundersen <teg@jklm.no>2014-06-29 22:22:35 +0200
commit31db01208bfefe2172aacf9c0d1ee3043a4117e3 (patch)
tree840e02215b32fb6051bed2abcc868fac21a657c3 /src/libsystemd-network/network-internal.c
parent46ba9fbae2517e6fee2a2b486ef9f06a62284b8c (diff)
netowrkd:deserialize_dhcp_routes verify strndup ret
strndup need to be chcked
Diffstat (limited to 'src/libsystemd-network/network-internal.c')
-rw-r--r--src/libsystemd-network/network-internal.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsystemd-network/network-internal.c b/src/libsystemd-network/network-internal.c
index a5db0c5353..317d5de6c4 100644
--- a/src/libsystemd-network/network-internal.c
+++ b/src/libsystemd-network/network-internal.c
@@ -474,6 +474,8 @@ int deserialize_dhcp_routes(struct sd_dhcp_route **ret, size_t *ret_size, size_t
return -ENOMEM;
entry = strndup(word, len);
+ if(!entry)
+ return -ENOMEM;
tok = entry;