summaryrefslogtreecommitdiff
path: root/source3/web
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 /source3/web
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 'source3/web')
-rw-r--r--source3/web/diagnose.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/web/diagnose.c b/source3/web/diagnose.c
index 221ce83f82..df61658f8d 100644
--- a/source3/web/diagnose.c
+++ b/source3/web/diagnose.c
@@ -44,10 +44,12 @@ bool nmbd_running(void)
if ((fd = open_socket_in(SOCK_DGRAM, 0, 3,
&ss, True)) != -1) {
- if ((ss_list = name_query(fd, "__SAMBA__", 0,
- True, True, &ss,
- &count, &flags, NULL)) != NULL) {
- SAFE_FREE(ss_list);
+ NTSTATUS status = name_query(fd, "__SAMBA__", 0,
+ True, True, &ss,
+ talloc_tos(), &ss_list, &count,
+ &flags, NULL);
+ if (NT_STATUS_IS_OK(status)) {
+ TALLOC_FREE(ss_list);
close(fd);
return True;
}