summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-12-28 13:47:35 +0100
committerVolker Lendecke <vlendec@samba.org>2010-12-28 18:21:05 +0100
commit4622812a41eb5ce07dd8f74534217e858743883f (patch)
tree3a07c7d4971c9e11fe3a623311098baaa7a925e4 /nsswitch
parent28d997a89056f144de6a7b95af0e54a044c5e5b3 (diff)
downloadsamba-4622812a41eb5ce07dd8f74534217e858743883f.tar.gz
samba-4622812a41eb5ce07dd8f74534217e858743883f.tar.bz2
samba-4622812a41eb5ce07dd8f74534217e858743883f.zip
s3: Make name_query return NTSTATUS
Also use talloc for the result Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Tue Dec 28 18:21:05 CET 2010 on sn-devel-104
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/wins.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/nsswitch/wins.c b/nsswitch/wins.c
index d7beed5352..ac062fe311 100644
--- a/nsswitch/wins.c
+++ b/nsswitch/wins.c
@@ -140,17 +140,20 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count)
const struct in_addr *bcast = iface_n_bcast_v4(j);
struct sockaddr_storage ss;
struct sockaddr_storage *pss;
+ NTSTATUS status;
+
if (!bcast) {
continue;
}
in_addr_to_sockaddr_storage(&ss, *bcast);
- pss = name_query(fd,name,0x00,True,True,&ss,count, &flags, NULL);
+ status = name_query(fd, name, 0x00, True, True, &ss,
+ NULL, &pss, count, &flags, NULL);
if (pss) {
if ((ret = SMB_MALLOC_P(struct in_addr)) == NULL) {
return NULL;
}
*ret = ((struct sockaddr_in *)pss)->sin_addr;
- SAFE_FREE(pss);
+ TALLOC_FREE(pss);
break;
}
}