From ea6e52fc6a5404b1910792941c49b550bdcc250e Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 22 Jun 2006 17:25:50 +0000 Subject: [PATCH] r16465: merge a few miniro SAMBA_3_0 fixes svn merge -r16435:16458 $SVNURL/branches/SAMBA_3_0 * note that I've skipped jra's change to the share_mode_entry since it si not critical for release. Maybe for 3.0.23a --- WHATSNEW.txt | 1 + source/libads/cldap.c | 3 +++ source/libsmb/clientgen.c | 2 +- source/utils/net_ads.c | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 2f7e47e6c49..cf725f52d33 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -58,6 +58,7 @@ o Guenther Deschner via "net rpc user add" * Add "rpc shell" to the usage text for the net command. * Winbindd user aliases lookup fixes for large domains. + * Fix memleak in the CLDAP processing code. o Bjoern Jacke . diff --git a/source/libads/cldap.c b/source/libads/cldap.c index f438f98599a..11c083a56a7 100644 --- a/source/libads/cldap.c +++ b/source/libads/cldap.c @@ -225,6 +225,7 @@ static int recv_cldap_netlogon(int sock, struct cldap_netlogon_reply *reply) asn1_end_tag(&data); if (data.has_error) { + asn1_free(&data); DEBUG(1,("Failed to parse cldap reply\n")); return -1; } @@ -262,6 +263,8 @@ static int recv_cldap_netlogon(int sock, struct cldap_netlogon_reply *reply) data_blob_free(&os3); data_blob_free(&blob); + asn1_free(&data); + return 0; } diff --git a/source/libsmb/clientgen.c b/source/libsmb/clientgen.c index f5116234c83..8342df0f1d1 100644 --- a/source/libsmb/clientgen.c +++ b/source/libsmb/clientgen.c @@ -367,7 +367,7 @@ BOOL cli_rpc_pipe_close(struct rpc_pipe_client *cli) ret = cli_close(cli->cli, cli->fnum); if (!ret) { - DEBUG(0,("cli_rpc_pipe_close: cli_close failed on pipe %s, " + DEBUG(1,("cli_rpc_pipe_close: cli_close failed on pipe %s, " "fnum 0x%x " "to machine %s. Error was %s\n", cli->pipe_name, diff --git a/source/utils/net_ads.c b/source/utils/net_ads.c index fabf36e2527..9d122a466bb 100644 --- a/source/utils/net_ads.c +++ b/source/utils/net_ads.c @@ -286,6 +286,7 @@ retry: goto retry; } else { DEBUG(0,("ads_connect: %s\n", ads_errstr(status))); + ads_destroy(&ads); return NULL; } } -- 2.11.4.GIT