diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-09-09 01:08:50 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:05:47 -0500 |
commit | 203bb616b97d3ecfcaacb1136cb07cf05561eba3 (patch) | |
tree | 655e0462df57c40bc12a3fb9840ffff820dd98c8 /source4/lib/socket | |
parent | e44d8bc87fbf4277fbd797f65de7842133fbe1e5 (diff) | |
download | samba-203bb616b97d3ecfcaacb1136cb07cf05561eba3.tar.gz samba-203bb616b97d3ecfcaacb1136cb07cf05561eba3.tar.bz2 samba-203bb616b97d3ecfcaacb1136cb07cf05561eba3.zip |
r25043: Avoid allocation on with NULL parent.
(This used to be commit 3f30cd5688a532a2d6c4d970c2bc759efa2a1b04)
Diffstat (limited to 'source4/lib/socket')
-rw-r--r-- | source4/lib/socket/interface.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/lib/socket/interface.c b/source4/lib/socket/interface.c index 00b1f6c635..992476fe22 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); |