From 4622812a41eb5ce07dd8f74534217e858743883f Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 28 Dec 2010 13:47:35 +0100 Subject: s3: Make name_query return NTSTATUS Also use talloc for the result Autobuild-User: Volker Lendecke Autobuild-Date: Tue Dec 28 18:21:05 CET 2010 on sn-devel-104 --- nsswitch/wins.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'nsswitch/wins.c') 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; } } -- cgit