[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-unstable-423-g37f0092
Jeremy Allison
jra at samba.org
Sat Dec 1 06:07:17 GMT 2007
The branch, v3-2-test has been updated
via 37f00926c29c22f27e7192c1fff0a08ce136cb86 (commit)
from 3e65fa5bcf5d1af3983f2e576698eccaad79fcda (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 37f00926c29c22f27e7192c1fff0a08ce136cb86
Author: Jeremy Allison <jra at samba.org>
Date: Fri Nov 30 21:57:43 2007 -0800
Fix missing error cleanup noticed by Derrell.
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source/libsmb/libsmbclient.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/libsmb/libsmbclient.c b/source/libsmb/libsmbclient.c
index 3990a29..26ff339 100644
--- a/source/libsmb/libsmbclient.c
+++ b/source/libsmb/libsmbclient.c
@@ -2777,7 +2777,6 @@ smbc_opendir_ctx(SMBCCTX *context,
struct ip_service *ip_list;
struct ip_service server_addr;
struct user_auth_info u_info;
- struct cli_state *cli;
if (share[0] != (char)0 || path[0] != (char)0) {
@@ -2838,6 +2837,7 @@ smbc_opendir_ctx(SMBCCTX *context,
for (i = 0; i < count && i < max_lmb_count; i++) {
char addr[INET6_ADDRSTRLEN];
char *wg_ptr = NULL;
+ struct cli_state *cli = NULL;
print_sockaddr(addr, sizeof(addr), &ip_list[i].ss);
DEBUG(99, ("Found master browser %d of %d: %s\n",
@@ -2850,17 +2850,20 @@ smbc_opendir_ctx(SMBCCTX *context,
&wg_ptr);
/* cli == NULL is the master browser refused to talk or
could not be found */
- if ( !cli )
+ if (!cli) {
continue;
+ }
workgroup = talloc_strdup(frame, wg_ptr);
server = talloc_strdup(frame, cli->desthost);
+
+ cli_shutdown(cli);
+
if (!workgroup || !server) {
errno = ENOMEM;
TALLOC_FREE(frame);
return NULL;
}
- cli_shutdown(cli);
DEBUG(4, ("using workgroup %s %s\n",
workgroup, server));
--
Samba Shared Repository
More information about the samba-cvs
mailing list