[SCM] Samba Shared Repository - branch v3-2-test updated -
release-3-2-0pre2-406-gd3b6df6
Volker Lendecke
vlendec at samba.org
Sun Mar 23 17:28:52 GMT 2008
The branch, v3-2-test has been updated
via d3b6df67fea0da5ffa962837400ebe07b34a5384 (commit)
via 94c29f55937e50dcf49124d28ad4e82c7fb4133e (commit)
via f17b1b0fc6340d21f1a2f43aa7eb2e87f851c51f (commit)
via 5f77938dc4a280b654b8d08656f19a7d04cea8c7 (commit)
via 70b33397ba6e18f40087fb642a1be62ee68d5f3a (commit)
via 45677e8694f0e383baa65712faec6a565ec0ce5c (commit)
via 700cceb6940c95997cfef374cffd50729a35528a (commit)
via 8f875674e7cf9ebd405561b1e3ab72b0284ce321 (commit)
via 9cf1e16a9c3cade9cd905f719de07578b3a91b1e (commit)
from 7070c77ee2a9c3c9ff1b3c7b93008b13b80ac02b (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit d3b6df67fea0da5ffa962837400ebe07b34a5384
Author: Volker Lendecke <vl at samba.org>
Date: Sun Mar 23 18:10:28 2008 +0100
Fix Coverity ID 471
commit 94c29f55937e50dcf49124d28ad4e82c7fb4133e
Author: Volker Lendecke <vl at samba.org>
Date: Sun Mar 23 18:08:13 2008 +0100
Fix Coverity ID 472
Simo, S4 also has this code. You might want to cherry-pick.
Volker
commit f17b1b0fc6340d21f1a2f43aa7eb2e87f851c51f
Author: Volker Lendecke <vl at samba.org>
Date: Sun Mar 23 17:58:26 2008 +0100
Fix Coverity ID 477
commit 5f77938dc4a280b654b8d08656f19a7d04cea8c7
Author: Volker Lendecke <vl at samba.org>
Date: Sun Mar 23 17:57:01 2008 +0100
Fix Coverity ID 478
commit 70b33397ba6e18f40087fb642a1be62ee68d5f3a
Author: Volker Lendecke <vl at samba.org>
Date: Sun Mar 23 17:54:48 2008 +0100
Fix Coverity ID 479
commit 45677e8694f0e383baa65712faec6a565ec0ce5c
Author: Volker Lendecke <vl at samba.org>
Date: Sun Mar 23 17:53:05 2008 +0100
Fix Coverity ID 480
commit 700cceb6940c95997cfef374cffd50729a35528a
Author: Volker Lendecke <vl at samba.org>
Date: Sun Mar 23 17:50:55 2008 +0100
Fix Coverity ID 450
commit 8f875674e7cf9ebd405561b1e3ab72b0284ce321
Author: Volker Lendecke <vl at samba.org>
Date: Sun Mar 23 17:49:04 2008 +0100
Fix Coverity ID 453
commit 9cf1e16a9c3cade9cd905f719de07578b3a91b1e
Author: Volker Lendecke <vl at samba.org>
Date: Sun Mar 23 17:32:46 2008 +0100
Fix Coverity ID 462
-----------------------------------------------------------------------
Summary of changes:
source/lib/ldb/tools/ldbedit.c | 10 ++++------
source/libgpo/gpo_ini.c | 4 ++--
source/modules/vfs_full_audit.c | 6 +++++-
source/registry/reg_backend_printing.c | 6 ++----
source/registry/regfio.c | 2 +-
source/rpc_parse/parse_buffer.c | 6 ++++--
source/utils/net.c | 2 +-
source/utils/net_ads.c | 2 +-
8 files changed, 20 insertions(+), 18 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/lib/ldb/tools/ldbedit.c b/source/lib/ldb/tools/ldbedit.c
index f8d1804..0e1fd38 100644
--- a/source/lib/ldb/tools/ldbedit.c
+++ b/source/lib/ldb/tools/ldbedit.c
@@ -319,12 +319,10 @@ int main(int argc, const char **argv)
do_edit(ldb, result->msgs, result->count, options->editor);
- if (result) {
- ret = talloc_free(result);
- if (ret == -1) {
- fprintf(stderr, "talloc_free failed\n");
- exit(1);
- }
+ ret = talloc_free(result);
+ if (ret == -1) {
+ fprintf(stderr, "talloc_free failed\n");
+ exit(1);
}
talloc_free(ldb);
diff --git a/source/libgpo/gpo_ini.c b/source/libgpo/gpo_ini.c
index d8f14b6..6f1593c 100644
--- a/source/libgpo/gpo_ini.c
+++ b/source/libgpo/gpo_ini.c
@@ -51,7 +51,7 @@ static NTSTATUS convert_file_from_ucs2(TALLOC_CTX *mem_ctx,
const char *filename_in,
char **filename_out)
{
- int tmp_fd = 0;
+ int tmp_fd = -1;
uint8 *data_in = NULL;
uint8 *data_out = NULL;
char *tmp_name = NULL;
@@ -112,7 +112,7 @@ static NTSTATUS convert_file_from_ucs2(TALLOC_CTX *mem_ctx,
status = NT_STATUS_OK;
out:
- if (tmp_fd) {
+ if (tmp_fd != -1) {
close(tmp_fd);
}
diff --git a/source/modules/vfs_full_audit.c b/source/modules/vfs_full_audit.c
index 6a88613..19218cc 100644
--- a/source/modules/vfs_full_audit.c
+++ b/source/modules/vfs_full_audit.c
@@ -679,7 +679,11 @@ static int audit_syslog_priority(vfs_handle_struct *handle)
int priority;
- priority = lp_parm_enum(SNUM(handle->conn), "full_audit", "priority", enum_log_priorities, LOG_NOTICE);
+ priority = lp_parm_enum(SNUM(handle->conn), "full_audit", "priority",
+ enum_log_priorities, LOG_NOTICE);
+ if (priority == -1) {
+ priority = LOG_WARNING;
+ }
return priority;
}
diff --git a/source/registry/reg_backend_printing.c b/source/registry/reg_backend_printing.c
index 582989d..5c1e6eb 100644
--- a/source/registry/reg_backend_printing.c
+++ b/source/registry/reg_backend_printing.c
@@ -373,8 +373,7 @@ static bool key_printers_store_keys( const char *key, REGSUBKEY_CTR *subkeys )
/* cleanup */
- if ( printer )
- free_a_printer( &printer, 2 );
+ free_a_printer( &printer, 2 );
SAFE_FREE( existing_subkeys );
@@ -516,8 +515,7 @@ static int key_printers_fetch_values( const char *key, REGVAL_CTR *values )
if ( (key_index = lookup_printerkey( p_data, printerdatakey )) == -1 ) {
/* failure....should never happen if the client has a valid open handle first */
DEBUG(10,("key_printers_fetch_values: Unknown keyname [%s]\n", printerdatakey));
- if ( printer )
- free_a_printer( &printer, 2 );
+ free_a_printer( &printer, 2 );
return -1;
}
diff --git a/source/registry/regfio.c b/source/registry/regfio.c
index 9eb2c58..b6e8229 100644
--- a/source/registry/regfio.c
+++ b/source/registry/regfio.c
@@ -1277,7 +1277,7 @@ static void regfio_mem_free( REGF_FILE *file )
/* nothing tdo do if there is no open file */
- if ( !file || (file->fd == -1) )
+ if (file->fd == -1)
return 0;
fd = file->fd;
diff --git a/source/rpc_parse/parse_buffer.c b/source/rpc_parse/parse_buffer.c
index bb39a58..63a73c4 100644
--- a/source/rpc_parse/parse_buffer.c
+++ b/source/rpc_parse/parse_buffer.c
@@ -374,8 +374,10 @@ bool smb_io_relarraystr(const char *desc, RPC_BUFFER *buffer, int depth, uint16
return False;
do {
- if (!smb_io_unistr(desc, &chaine, ps, depth))
+ if (!smb_io_unistr(desc, &chaine, ps, depth)) {
+ SAFE_FREE(chaine2);
return False;
+ }
l_chaine=str_len_uni(&chaine);
@@ -402,10 +404,10 @@ bool smb_io_relarraystr(const char *desc, RPC_BUFFER *buffer, int depth, uint16
{
chaine2[l_chaine2] = '\0';
*string=(uint16 *)TALLOC_MEMDUP(prs_get_mem_context(ps),chaine2,realloc_size);
+ SAFE_FREE(chaine2);
if (!*string) {
return False;
}
- SAFE_FREE(chaine2);
}
if(!prs_set_offset(ps, old_offset))
diff --git a/source/utils/net.c b/source/utils/net.c
index 586ea2f..1b21c5e 100644
--- a/source/utils/net.c
+++ b/source/utils/net.c
@@ -503,7 +503,7 @@ bool net_find_server(const char *domain,
*server_name = SMB_STRDUP("127.0.0.1");
}
- if (!server_name || !*server_name) {
+ if (!*server_name) {
DEBUG(1,("no server to connect to\n"));
return False;
}
diff --git a/source/utils/net_ads.c b/source/utils/net_ads.c
index e9750db..28ae7d7 100644
--- a/source/utils/net_ads.c
+++ b/source/utils/net_ads.c
@@ -1679,7 +1679,7 @@ static int net_ads_password(int argc, const char **argv)
fill in the KDC's addresss */
ads_connect(ads);
- if (!ads || !ads->config.realm) {
+ if (!ads->config.realm) {
d_fprintf(stderr, "Didn't find the kerberos server!\n");
return -1;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list