From 13a4922ae631578fcc88eb6b98a15361fd805186 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 14 Aug 2010 12:23:13 +0200 Subject: s3: Remove a conn NULL check from claim_connection We've already dereferenced conn before --- source3/smbd/connection.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c index 5acc8218b7..f4f4fc217b 100644 --- a/source3/smbd/connection.c +++ b/source3/smbd/connection.c @@ -127,7 +127,6 @@ bool claim_connection(connection_struct *conn, const char *name) struct connections_data crec; TDB_DATA dbuf; NTSTATUS status; - char addr[INET6_ADDRSTRLEN]; DEBUG(5,("claiming [%s]\n", name)); @@ -148,9 +147,7 @@ bool claim_connection(connection_struct *conn, const char *name) crec.start = time(NULL); strlcpy(crec.machine,get_remote_machine_name(),sizeof(crec.machine)); - strlcpy(crec.addr,conn?conn->client_address: - client_addr(get_client_fd(),addr,sizeof(addr)), - sizeof(crec.addr)); + strlcpy(crec.addr, conn->client_address, sizeof(crec.addr)); dbuf.dptr = (uint8 *)&crec; dbuf.dsize = sizeof(crec); -- cgit