[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-612-g3a6133d

Günther Deschner gd at samba.org
Fri Mar 20 10:25:12 GMT 2009


The branch, master has been updated
       via  3a6133d70202ef80ead4203740c000be5e93b288 (commit)
       via  f2243e8197aa064adea3da2a4d1c08250668943f (commit)
       via  d2e348b191ada5492538b7bdae1bb7cd3f639aba (commit)
       via  97190ae184dff6450b1390c854f7426e2ee3f980 (commit)
       via  73030b107d5722a2c42cd18240d45bcb256335ac (commit)
       via  d2fb6d348248cdca7e55360c77aa31b91250f885 (commit)
      from  045151b767c62ac1343e86cb3886107226e73fda (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 3a6133d70202ef80ead4203740c000be5e93b288
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 20 11:21:36 2009 +0100

    s3-netapi: Fix Coverity #774 (REVERSE_INULL).
    
    Guenther

commit f2243e8197aa064adea3da2a4d1c08250668943f
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 20 11:19:59 2009 +0100

    s3-netapi: Fix Coverity #775 (REVERSE_INULL).
    
    Guenther

commit d2e348b191ada5492538b7bdae1bb7cd3f639aba
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 20 11:17:50 2009 +0100

    s3-netapi: Fix Coverity #776 (REVERSE_INULL).
    
    Guenther

commit 97190ae184dff6450b1390c854f7426e2ee3f980
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 20 11:11:04 2009 +0100

    s3-krb5: Fix Coverity #762 (REVERSE_INULL).
    
    Guenther

commit 73030b107d5722a2c42cd18240d45bcb256335ac
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 20 11:07:21 2009 +0100

    s3-net: Fix Coverity #861 (UNINIT).
    
    Guenther

commit d2fb6d348248cdca7e55360c77aa31b91250f885
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 20 11:04:59 2009 +0100

    s3-net: Fix Coverity #898 (UNINIT).
    
    Guenther

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

Summary of changes:
 source3/lib/netapi/group.c |   10 +++-------
 source3/lib/netapi/user.c  |   18 ++++++------------
 source3/libads/kerberos.c  |   12 ++++++------
 source3/utils/net_rpc.c    |    4 ++--
 4 files changed, 17 insertions(+), 27 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/netapi/group.c b/source3/lib/netapi/group.c
index 189902a..c09632a 100644
--- a/source3/lib/netapi/group.c
+++ b/source3/lib/netapi/group.c
@@ -1276,6 +1276,7 @@ WERROR NetGroupGetUsers_r(struct libnetapi_ctx *ctx,
 
 	*r->out.buffer = NULL;
 	*r->out.entries_read = 0;
+	*r->out.total_entries = 0;
 
 	switch (r->in.level) {
 		case 0:
@@ -1364,13 +1365,8 @@ WERROR NetGroupGetUsers_r(struct libnetapi_ctx *ctx,
 		}
 	}
 
-	if (r->out.entries_read) {
-		*r->out.entries_read = entries_read;
-	}
-
-	if (r->out.total_entries) {
-		*r->out.total_entries = entries_read;
-	}
+	*r->out.entries_read = entries_read;
+	*r->out.total_entries = entries_read;
 
 	werr = WERR_OK;
 
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c
index 8cc65a6..e760a8b 100644
--- a/source3/lib/netapi/user.c
+++ b/source3/lib/netapi/user.c
@@ -2806,6 +2806,7 @@ WERROR NetUserGetGroups_r(struct libnetapi_ctx *ctx,
 
 	*r->out.buffer = NULL;
 	*r->out.entries_read = 0;
+	*r->out.total_entries = 0;
 
 	switch (r->in.level) {
 		case 0:
@@ -2899,12 +2900,8 @@ WERROR NetUserGetGroups_r(struct libnetapi_ctx *ctx,
 		}
 	}
 
-	if (r->out.entries_read) {
-		*r->out.entries_read = entries_read;
-	}
-	if (r->out.total_entries) {
-		*r->out.total_entries = entries_read;
-	}
+	*r->out.entries_read = entries_read;
+	*r->out.total_entries = entries_read;
 
  done:
 	if (ctx->disable_policy_handle_cache) {
@@ -3242,6 +3239,7 @@ WERROR NetUserGetLocalGroups_r(struct libnetapi_ctx *ctx,
 
 	*r->out.buffer = NULL;
 	*r->out.entries_read = 0;
+	*r->out.total_entries = 0;
 
 	switch (r->in.level) {
 		case 0:
@@ -3402,12 +3400,8 @@ WERROR NetUserGetLocalGroups_r(struct libnetapi_ctx *ctx,
 		}
 	}
 
-	if (r->out.entries_read) {
-		*r->out.entries_read = entries_read;
-	}
-	if (r->out.total_entries) {
-		*r->out.total_entries = entries_read;
-	}
+	*r->out.entries_read = entries_read;
+	*r->out.total_entries = entries_read;
 
  done:
 	if (ctx->disable_policy_handle_cache) {
diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c
index 56d7b06..52cb975 100644
--- a/source3/libads/kerberos.c
+++ b/source3/libads/kerberos.c
@@ -511,13 +511,13 @@ char *kerberos_get_default_realm_from_ccache( void )
 
   out:
 
-	if (princ) {
-		krb5_free_principal(ctx, princ);
-	}
-	if (cc) {
-		krb5_cc_close(ctx, cc);
-	}
 	if (ctx) {
+		if (princ) {
+			krb5_free_principal(ctx, princ);
+		}
+		if (cc) {
+			krb5_cc_close(ctx, cc);
+		}
 		krb5_free_context(ctx);
 	}
 
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index d83fb44..21881ba 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -54,7 +54,7 @@ NTSTATUS net_get_remote_domain_sid(struct cli_state *cli, TALLOC_CTX *mem_ctx,
 				   DOM_SID **domain_sid,
 				   const char **domain_name)
 {
-	struct rpc_pipe_client *lsa_pipe;
+	struct rpc_pipe_client *lsa_pipe = NULL;
 	struct policy_handle pol;
 	NTSTATUS result = NT_STATUS_OK;
 	union lsa_PolicyInformation *info = NULL;
@@ -1657,7 +1657,7 @@ static NTSTATUS get_sid_from_name(struct cli_state *cli,
 {
 	DOM_SID *sids = NULL;
 	enum lsa_SidType *types = NULL;
-	struct rpc_pipe_client *pipe_hnd;
+	struct rpc_pipe_client *pipe_hnd = NULL;
 	struct policy_handle lsa_pol;
 	NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list