Signed-off-by: Dwight Engen <[email protected]>
---
src/lxc/network.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/lxc/network.c b/src/lxc/network.c
index 93fc169..d1ccc0d 100644
--- a/src/lxc/network.c
+++ b/src/lxc/network.c
@@ -783,8 +783,11 @@ static int ifa_get_local_ip(int family, struct ip_req
*ip_info, void** res) {
/* We might have found an IFA_ADDRESS before,
* which we now overwrite with an IFA_LOCAL. */
- if (!*res)
+ if (!*res) {
*res = malloc(addrlen);
+ if (!*res)
+ return -1;
+ }
memcpy(*res, RTA_DATA(rta), addrlen);
--
1.8.1.4
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Lxc-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxc-devel