From: Jelmer Vernooij Date: Sun, 9 Sep 2007 01:08:50 +0000 (+0000) Subject: r25043: Avoid allocation on with NULL parent. X-Git-Url: http://git.samba.org/samba.git/?p=kai%2Fsamba.git;a=commitdiff_plain;h=203bb616b97d3ecfcaacb1136cb07cf05561eba3 r25043: Avoid allocation on with NULL parent. (This used to be commit 3f30cd5688a532a2d6c4d970c2bc759efa2a1b04) --- diff --git a/source4/lib/socket/interface.c b/source4/lib/socket/interface.c index 00b1f6c6355..992476fe223 100644 --- a/source4/lib/socket/interface.c +++ b/source4/lib/socket/interface.c @@ -75,12 +75,13 @@ static void add_interface(struct in_addr ip, struct in_addr nmask) { struct interface *iface; struct ipv4_addr bcast; - if (iface_find(ip, False)) { + + if (iface_find(ip, false)) { DEBUG(3,("not adding duplicate interface %s\n",inet_ntoa(ip))); return; } - iface = talloc(local_interfaces, struct interface); + iface = talloc(local_interfaces == NULL ? talloc_autofree_context() : local_interfaces, struct interface); if (!iface) return; ZERO_STRUCTPN(iface);