The branch, v3-6-test has been updated
via c9f1cd6 s3: Fix Coverity ID 2217: RESOURCE_LEAK
via 6dd0a66 s3: Fix Coverity ID 2220: RESOURCE_LEAK (cherry picked from
commit 40306f2247cfedb2b0c3af3a7392b1a7e83c57ab)
via 94daaf0 s3: Fix Coverity ID 2221: RESOURCE_LEAK (cherry picked from
commit a56eb9b88733fbee30e3640d3e4b0ede6bf434d7)
via c8a48a8 s3: Fix Coverity ID 2222: RESOURCE_LEAK (cherry picked from
commit 9a97a8307ccda6d5a78de5e7e615209578d3a672)
via 511ed20 s3: Fix Coverity ID 2223: RESOURCE_LEAK (cherry picked from
commit 12bf8470588ad38b415327f92dfbce5c321b3715)
via 195ba5d s3: Fix Coverity ID 2236: REVERSE_INULL
via 49a3685 s3: Fix Coverity ID 2332: MISSING_BREAK (cherry picked from
commit de635fe1f71abfdce50e49dc517b4a55f8449c2f)
via e354de4 s3: Fix Coverity ID 2237: REVERSE_INULL (cherry picked from
commit 0764e72051c6b74efe07539736f09c90b2e52672)
via b659b6c tdb: Fix Coverity ID 2238: SECURE_CODING (cherry picked
from commit 0080f944b47f3afa676153e5da7093a8667fc005)
via 34edfc5 s3: Fix Coverity ID 2304: FORWARD_NULL (cherry picked from
commit 014d4093c3bdf0481a415b2df3084b743a9b4845)
from 29ccbca s3-libsmb: remove duplicate NTSTATUS variable.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test
- Log -----------------------------------------------------------------
commit c9f1cd67d1c798e361db5949e5cacea15db805a7
Author: Volker Lendecke <[email protected]>
Date: Wed Mar 30 07:06:18 2011 +0200
s3: Fix Coverity ID 2217: RESOURCE_LEAK
Autobuild-User: Volker Lendecke <[email protected]>
Autobuild-Date: Wed Mar 30 10:45:44 CEST 2011 on sn-devel-104
(cherry picked from commit 0fea80c1d6e3ad819e66fc7feafecb1e8b54728e)
commit 6dd0a66c0b096e5b384b9cf550cc4e62f93d9b7f
Author: Volker Lendecke <[email protected]>
Date: Wed Mar 30 07:06:18 2011 +0200
s3: Fix Coverity ID 2220: RESOURCE_LEAK
(cherry picked from commit 40306f2247cfedb2b0c3af3a7392b1a7e83c57ab)
commit 94daaf056d34a3546174e9ddb6c6db632dd17983
Author: Volker Lendecke <[email protected]>
Date: Wed Mar 30 07:06:18 2011 +0200
s3: Fix Coverity ID 2221: RESOURCE_LEAK
(cherry picked from commit a56eb9b88733fbee30e3640d3e4b0ede6bf434d7)
commit c8a48a8a70bc41d3c51524c61b718f9ce24a6191
Author: Volker Lendecke <[email protected]>
Date: Wed Mar 30 07:06:18 2011 +0200
s3: Fix Coverity ID 2222: RESOURCE_LEAK
(cherry picked from commit 9a97a8307ccda6d5a78de5e7e615209578d3a672)
commit 511ed20ef82c75911a984ff9c1776a0d91df5f65
Author: Volker Lendecke <[email protected]>
Date: Wed Mar 30 07:04:47 2011 +0200
s3: Fix Coverity ID 2223: RESOURCE_LEAK
(cherry picked from commit 12bf8470588ad38b415327f92dfbce5c321b3715)
commit 195ba5dd6b3757eb42f4a05ab488306053c6cf39
Author: Volker Lendecke <[email protected]>
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
(cherry picked from commit 8486f0fa0495e51d204dca970bf864041123b631)
commit 49a3685374e23b61cc5454309d83eec05764e527
Author: Volker Lendecke <[email protected]>
Date: Wed Mar 30 06:41:18 2011 +0200
s3: Fix Coverity ID 2332: MISSING_BREAK
(cherry picked from commit de635fe1f71abfdce50e49dc517b4a55f8449c2f)
commit e354de4addd71a0deeb7b8c2a7e668e27e168163
Author: Volker Lendecke <[email protected]>
Date: Wed Mar 30 06:53:15 2011 +0200
s3: Fix Coverity ID 2237: REVERSE_INULL
(cherry picked from commit 0764e72051c6b74efe07539736f09c90b2e52672)
commit b659b6c63a895348efb9b1a1420e54148f4bcebc
Author: Volker Lendecke <[email protected]>
Date: Wed Mar 30 06:51:40 2011 +0200
tdb: Fix Coverity ID 2238: SECURE_CODING
(cherry picked from commit 0080f944b47f3afa676153e5da7093a8667fc005)
commit 34edfc5494c0172aea860486080a779dce949596
Author: Volker Lendecke <[email protected]>
Date: Wed Mar 30 06:45:04 2011 +0200
s3: Fix Coverity ID 2304: FORWARD_NULL
(cherry picked from commit 014d4093c3bdf0481a415b2df3084b743a9b4845)
-----------------------------------------------------------------------
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 e38d1f5..282121d 100644
--- a/source3/rpc_server/lsa/srv_lsa_nt.c
+++ b/source3/rpc_server/lsa/srv_lsa_nt.c
@@ -3661,6 +3661,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 b6efaa1..1749eb0 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -1145,9 +1145,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 6c67f3e..b9ff4d3 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -671,9 +671,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 1aa2349..f01308c 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