diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-01-28 15:47:20 +0000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2004-01-28 15:47:20 +0000 |
commit | 607d6948f2d8350c1700505b78f9e62ccf5d21cd (patch) | |
tree | 2a8b63dc8f053cf55755f4aee3c866c2382e9412 | |
parent | 7de61be92413ce03bab20ab332e9b16dea56fc97 (diff) | |
download | samba-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)
-rw-r--r-- | source4/configure.in | 3 | ||||
-rw-r--r-- | source4/smbd/process.c | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/source4/configure.in b/source4/configure.in index b0a8b950a4..6145871911 100644 --- a/source4/configure.in +++ b/source4/configure.in @@ -455,7 +455,7 @@ AC_HEADER_STDC AC_HEADER_DIRENT AC_HEADER_TIME AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(arpa/inet.h sys/select.h fcntl.h sys/time.h) +AC_CHECK_HEADERS(arpa/inet.h sys/select.h fcntl.h sys/fcntl.h sys/time.h) AC_CHECK_HEADERS(unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h) AC_CHECK_HEADERS(compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h) AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h) @@ -1819,7 +1819,6 @@ dnl glibc2.1 broken check has succeeded. dnl AC_CACHE_CHECK([for 64 bit fcntl locking],samba_cv_HAVE_STRUCT_FLOCK64,[ - AC_CHECK_HEADERS(sys/fcntl.h) AC_TRY_RUN([ #if defined(HAVE_UNISTD_H) #include <unistd.h> 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; |