[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Wed Mar 30 02:46:01 MDT 2011
The branch, master has been updated
via 0fea80c s3: Fix Coverity ID 2217: RESOURCE_LEAK
via 40306f2 s3: Fix Coverity ID 2220: RESOURCE_LEAK
via a56eb9b s3: Fix Coverity ID 2221: RESOURCE_LEAK
via 9a97a83 s3: Fix Coverity ID 2222: RESOURCE_LEAK
via 12bf847 s3: Fix Coverity ID 2223: RESOURCE_LEAK
via 8486f0f s3: Fix Coverity ID 2236: REVERSE_INULL
via de635fe s3: Fix Coverity ID 2332: MISSING_BREAK
via 0764e72 s3: Fix Coverity ID 2237: REVERSE_INULL
via 0080f94 tdb: Fix Coverity ID 2238: SECURE_CODING
via 014d409 s3: Fix Coverity ID 2304: FORWARD_NULL
from 32a76ca s4:lib/policy/gp_ldap.c - make more use of LDB result constants
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 0fea80c1d6e3ad819e66fc7feafecb1e8b54728e
Author: Volker Lendecke <vl at samba.org>
Date: Wed Mar 30 07:06:18 2011 +0200
s3: Fix Coverity ID 2217: RESOURCE_LEAK
Autobuild-User: Volker Lendecke <vlendec at samba.org>
Autobuild-Date: Wed Mar 30 10:45:44 CEST 2011 on sn-devel-104
commit 40306f2247cfedb2b0c3af3a7392b1a7e83c57ab
Author: Volker Lendecke <vl at samba.org>
Date: Wed Mar 30 07:06:18 2011 +0200
s3: Fix Coverity ID 2220: RESOURCE_LEAK
commit a56eb9b88733fbee30e3640d3e4b0ede6bf434d7
Author: Volker Lendecke <vl at samba.org>
Date: Wed Mar 30 07:06:18 2011 +0200
s3: Fix Coverity ID 2221: RESOURCE_LEAK
commit 9a97a8307ccda6d5a78de5e7e615209578d3a672
Author: Volker Lendecke <vl at samba.org>
Date: Wed Mar 30 07:06:18 2011 +0200
s3: Fix Coverity ID 2222: RESOURCE_LEAK
commit 12bf8470588ad38b415327f92dfbce5c321b3715
Author: Volker Lendecke <vl at samba.org>
Date: Wed Mar 30 07:04:47 2011 +0200
s3: Fix Coverity ID 2223: RESOURCE_LEAK
commit 8486f0fa0495e51d204dca970bf864041123b631
Author: Volker Lendecke <vl at samba.org>
Date: Wed Mar 30 06:57:05 2011 +0200
s3: Fix Coverity ID 2236: REVERSE_INULL
We have already dereferenced "b", and the other calls in this loop can only
have worked with a valid handle
commit de635fe1f71abfdce50e49dc517b4a55f8449c2f
Author: Volker Lendecke <vl at samba.org>
Date: Wed Mar 30 06:41:18 2011 +0200
s3: Fix Coverity ID 2332: MISSING_BREAK
commit 0764e72051c6b74efe07539736f09c90b2e52672
Author: Volker Lendecke <vl at samba.org>
Date: Wed Mar 30 06:53:15 2011 +0200
s3: Fix Coverity ID 2237: REVERSE_INULL
commit 0080f944b47f3afa676153e5da7093a8667fc005
Author: Volker Lendecke <vl at samba.org>
Date: Wed Mar 30 06:51:40 2011 +0200
tdb: Fix Coverity ID 2238: SECURE_CODING
commit 014d4093c3bdf0481a415b2df3084b743a9b4845
Author: Volker Lendecke <vl at samba.org>
Date: Wed Mar 30 06:45:04 2011 +0200
s3: Fix Coverity ID 2304: FORWARD_NULL
-----------------------------------------------------------------------
Summary of changes:
lib/tdb/common/summary.c | 48 +++++++++++++++++-----------------
nsswitch/libwbclient/wbc_sid.c | 2 +-
nsswitch/wbinfo.c | 8 ++++++
source3/rpc_server/lsa/srv_lsa_nt.c | 1 +
source3/smbd/lanman.c | 4 +--
source3/smbd/sesssetup.c | 4 +--
source3/winbindd/winbindd_msrpc.c | 4 +--
7 files changed, 37 insertions(+), 34 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/tdb/common/summary.c b/lib/tdb/common/summary.c
index da1ec2b..b222a59 100644
--- a/lib/tdb/common/summary.c
+++ b/lib/tdb/common/summary.c
@@ -159,30 +159,30 @@ _PUBLIC_ char *tdb_summary(struct tdb_context *tdb)
if (!ret)
goto unlock;
- sprintf(ret, SUMMARY_FORMAT,
- tdb->map_size, keys.total+data.total,
- keys.num,
- keys.min, tally_mean(&keys), keys.max,
- data.min, tally_mean(&data), data.max,
- extra.min, tally_mean(&extra), extra.max,
- dead.num,
- dead.min, tally_mean(&dead), dead.max,
- freet.num,
- freet.min, tally_mean(&freet), freet.max,
- hash.num,
- hash.min, tally_mean(&hash), hash.max,
- uncoal.total,
- uncoal.min, tally_mean(&uncoal), uncoal.max,
- keys.total * 100.0 / tdb->map_size,
- data.total * 100.0 / tdb->map_size,
- extra.total * 100.0 / tdb->map_size,
- freet.total * 100.0 / tdb->map_size,
- dead.total * 100.0 / tdb->map_size,
- (keys.num + freet.num + dead.num)
- * (sizeof(struct tdb_record) + sizeof(uint32_t))
- * 100.0 / tdb->map_size,
- tdb->header.hash_size * sizeof(tdb_off_t)
- * 100.0 / tdb->map_size);
+ snprintf(ret, len, SUMMARY_FORMAT,
+ tdb->map_size, keys.total+data.total,
+ keys.num,
+ keys.min, tally_mean(&keys), keys.max,
+ data.min, tally_mean(&data), data.max,
+ extra.min, tally_mean(&extra), extra.max,
+ dead.num,
+ dead.min, tally_mean(&dead), dead.max,
+ freet.num,
+ freet.min, tally_mean(&freet), freet.max,
+ hash.num,
+ hash.min, tally_mean(&hash), hash.max,
+ uncoal.total,
+ uncoal.min, tally_mean(&uncoal), uncoal.max,
+ keys.total * 100.0 / tdb->map_size,
+ data.total * 100.0 / tdb->map_size,
+ extra.total * 100.0 / tdb->map_size,
+ freet.total * 100.0 / tdb->map_size,
+ dead.total * 100.0 / tdb->map_size,
+ (keys.num + freet.num + dead.num)
+ * (sizeof(struct tdb_record) + sizeof(uint32_t))
+ * 100.0 / tdb->map_size,
+ tdb->header.hash_size * sizeof(tdb_off_t)
+ * 100.0 / tdb->map_size);
unlock:
if (locked) {
diff --git a/nsswitch/libwbclient/wbc_sid.c b/nsswitch/libwbclient/wbc_sid.c
index e8148aa..712c865 100644
--- a/nsswitch/libwbclient/wbc_sid.c
+++ b/nsswitch/libwbclient/wbc_sid.c
@@ -768,8 +768,8 @@ wbcErr wbcGetDisplayName(const struct wbcDomainSid *sid,
wbcFreeMemory(name);
name = wbcStrDup(pwd->pw_gecos);
- BAIL_ON_PTR_ERROR(name, wbc_status);
wbcFreeMemory(pwd);
+ BAIL_ON_PTR_ERROR(name, wbc_status);
}
wbc_status = WBC_ERR_SUCCESS;
diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c
index 2436b3b..bb03750 100644
--- a/nsswitch/wbinfo.c
+++ b/nsswitch/wbinfo.c
@@ -187,6 +187,8 @@ static bool wbinfo_get_userinfo(char *user)
pwd->pw_dir,
pwd->pw_shell);
+ wbcFreeMemory(pwd);
+
return true;
}
@@ -212,6 +214,8 @@ static bool wbinfo_get_uidinfo(int uid)
pwd->pw_dir,
pwd->pw_shell);
+ wbcFreeMemory(pwd);
+
return true;
}
@@ -567,6 +571,8 @@ static bool wbinfo_list_domains(bool list_all_domains, bool verbose)
d_printf("\n");
}
+ wbcFreeMemory(domain_list);
+
return true;
}
@@ -619,6 +625,8 @@ static bool wbinfo_show_onlinestatus(const char *domain)
is_offline ? "offline" : "online" );
}
+ wbcFreeMemory(domain_list);
+
return true;
}
diff --git a/source3/rpc_server/lsa/srv_lsa_nt.c b/source3/rpc_server/lsa/srv_lsa_nt.c
index 63ff41c..5f028e6 100644
--- a/source3/rpc_server/lsa/srv_lsa_nt.c
+++ b/source3/rpc_server/lsa/srv_lsa_nt.c
@@ -3664,6 +3664,7 @@ static NTSTATUS check_ft_info(TALLOC_CTX *mem_ctx,
ex_rule = false;
tname = trec->data.info.dns_name.string;
tlen = trec->data.info.dns_name.size;
+ break;
default:
return NT_STATUS_INVALID_PARAMETER;
}
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index bf2987f..a04f062 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -1148,9 +1148,7 @@ static bool api_DosPrintQEnum(struct smbd_server_connection *sconn,
subcntarr[i] = num_jobs;
subcnt += subcntarr[i];
- if (b && is_valid_policy_hnd(&handle)) {
- dcerpc_spoolss_ClosePrinter(b, mem_ctx, &handle, &werr);
- }
+ dcerpc_spoolss_ClosePrinter(b, mem_ctx, &handle, &werr);
}
if (init_package(&desc,queuecnt,subcnt)) {
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index b002fe9..c5d44c6 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -673,9 +673,7 @@ static void reply_spnego_negotiate(struct smb_request *req,
}
#endif
- if (*auth_ntlmssp_state) {
- TALLOC_FREE(*auth_ntlmssp_state);
- }
+ TALLOC_FREE(*auth_ntlmssp_state);
if (kerb_mech) {
data_blob_free(&secblob);
diff --git a/source3/winbindd/winbindd_msrpc.c b/source3/winbindd/winbindd_msrpc.c
index 7bbcf77..7ddad1e 100644
--- a/source3/winbindd/winbindd_msrpc.c
+++ b/source3/winbindd/winbindd_msrpc.c
@@ -522,9 +522,7 @@ static NTSTATUS msrpc_lookup_usergroups(struct winbindd_domain *domain,
}
cached:
- if (pnum_groups) {
- *pnum_groups = num_groups;
- }
+ *pnum_groups = num_groups;
if (puser_grpsids) {
*puser_grpsids = talloc_move(mem_ctx, &user_grpsids);
--
Samba Shared Repository
More information about the samba-cvs
mailing list