summaryrefslogtreecommitdiff
path: root/source4/smbd
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-01-28 15:47:20 +0000
committerStefan Metzmacher <metze@samba.org>2004-01-28 15:47:20 +0000
commit607d6948f2d8350c1700505b78f9e62ccf5d21cd (patch)
tree2a8b63dc8f053cf55755f4aee3c866c2382e9412 /source4/smbd
parent7de61be92413ce03bab20ab332e9b16dea56fc97 (diff)
downloadsamba-607d6948f2d8350c1700505b78f9e62ccf5d21cd.tar.gz
samba-607d6948f2d8350c1700505b78f9e62ccf5d21cd.tar.bz2
samba-607d6948f2d8350c1700505b78f9e62ccf5d21cd.zip
- cosmetic fix in configure.in
- fix mem leak in process.c metze (This used to be commit d82ada11377e7613fc7c48afa9ef5f8a2e54233c)
Diffstat (limited to 'source4/smbd')
-rw-r--r--source4/smbd/process.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/smbd/process.c b/source4/smbd/process.c
index 0891e3de76..f3ca69ea32 100644
--- a/source4/smbd/process.c
+++ b/source4/smbd/process.c
@@ -717,6 +717,7 @@ void init_smbsession(struct event_context *ev, struct model_ops *model_ops, int
struct server_context *smb;
TALLOC_CTX *mem_ctx;
struct fd_event fde;
+ char *socket_addr;
set_socket_options(fd,"SO_KEEPALIVE");
set_socket_options(fd, lp_socket_options());
@@ -736,8 +737,9 @@ void init_smbsession(struct event_context *ev, struct model_ops *model_ops, int
/* set an initial client name based on its IP address. This will be replaced with
the netbios name later if it gives us one */
- sub_set_remote_machine(strdup(get_socket_addr(smb->mem_ctx, fd)));
- smb->socket.client_addr = get_socket_addr(smb->mem_ctx, fd);
+ socket_addr = get_socket_addr(smb->mem_ctx, fd);
+ sub_set_remote_machine(socket_addr);
+ smb->socket.client_addr = socket_addr;
/* now initialise a few default values associated with this smb socket */
smb->negotiate.max_send = 0xFFFF;