svn commit: samba r25043 - in branches/SAMBA_4_0: .
source/lib/socket
jelmer at samba.org
jelmer at samba.org
Sun Sep 9 01:08:52 GMT 2007
Author: jelmer
Date: 2007-09-09 01:08:50 +0000 (Sun, 09 Sep 2007)
New Revision: 25043
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25043
Log:
Avoid allocation on with NULL parent.
Modified:
branches/SAMBA_4_0/
branches/SAMBA_4_0/source/lib/socket/interface.c
Changeset:
Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...
Modified: branches/SAMBA_4_0/source/lib/socket/interface.c
===================================================================
--- branches/SAMBA_4_0/source/lib/socket/interface.c 2007-09-08 21:06:57 UTC (rev 25042)
+++ branches/SAMBA_4_0/source/lib/socket/interface.c 2007-09-09 01:08:50 UTC (rev 25043)
@@ -75,12 +75,13 @@
{
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);
More information about the samba-cvs
mailing list