[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-1214-geea07b0

Jeremy Allison jra at samba.org
Wed Jan 9 03:04:31 GMT 2008


The branch, v3-2-test has been updated
       via  eea07b0c83985af60395f8a31de5bac4e5398cff (commit)
      from  d61831164b482d02e0eef3c28aeed93d3e44433f (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit eea07b0c83985af60395f8a31de5bac4e5398cff
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jan 8 18:51:55 2008 -0800

    Fix CID 461 - resource leak on error.
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source/libsmb/clidfs.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libsmb/clidfs.c b/source/libsmb/clidfs.c
index 77419b4..16582f8 100644
--- a/source/libsmb/clidfs.c
+++ b/source/libsmb/clidfs.c
@@ -156,6 +156,9 @@ static struct cli_state *do_connect(TALLOC_CTX *ctx,
 	/* have to open a new connection */
 	if (!(c=cli_initialise()) || (cli_set_port(c, port) != port)) {
 		d_printf("Connection to %s failed\n", server_n);
+		if (c) {
+			cli_shutdown(c);
+		}
 		return NULL;
 	}
 	status = cli_connect(c, server_n, &ss);
@@ -163,6 +166,7 @@ static struct cli_state *do_connect(TALLOC_CTX *ctx,
 		d_printf("Connection to %s failed (Error %s)\n",
 				server_n,
 				nt_errstr(status));
+		cli_shutdown(c);
 		return NULL;
 	}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list