[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-5153-g9bf3e12

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


The branch, v3-3-test has been updated
       via  9bf3e129605d51483fd5ce47c90642f7e82ac102 (commit)
       via  3b0f612c52e992cd130f5176432722bada3c64e4 (commit)
       via  76c858c6fcb8111e3fd87a2a8aa2606ab06bb90a (commit)
       via  0f7757e94bfa35d22a7349d78578685c0dba22d7 (commit)
      from  3517388b5d5439ffe3f9629aaf826fa1dfbb4ba7 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test


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

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

commit 3b0f612c52e992cd130f5176432722bada3c64e4
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 20 11:34:43 2009 +0100

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

commit 76c858c6fcb8111e3fd87a2a8aa2606ab06bb90a
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
    (cherry picked from commit d2e348b191ada5492538b7bdae1bb7cd3f639aba)

commit 0f7757e94bfa35d22a7349d78578685c0dba22d7
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
    (cherry picked from commit 97190ae184dff6450b1390c854f7426e2ee3f980)

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

Summary of changes:
 source/lib/netapi/group.c |   10 +++-------
 source/lib/netapi/user.c  |   18 ++++++------------
 source/libads/kerberos.c  |   12 ++++++------
 3 files changed, 15 insertions(+), 25 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/netapi/group.c b/source/lib/netapi/group.c
index a78c784..b3bb14e 100644
--- a/source/lib/netapi/group.c
+++ b/source/lib/netapi/group.c
@@ -1319,6 +1319,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:
@@ -1408,13 +1409,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/source/lib/netapi/user.c b/source/lib/netapi/user.c
index 1f4b03f..84d32dc 100644
--- a/source/lib/netapi/user.c
+++ b/source/lib/netapi/user.c
@@ -2849,6 +2849,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:
@@ -2943,12 +2944,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 (!cli) {
@@ -3297,6 +3294,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:
@@ -3458,12 +3456,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 (!cli) {
diff --git a/source/libads/kerberos.c b/source/libads/kerberos.c
index 56c3af8..973647e 100644
--- a/source/libads/kerberos.c
+++ b/source/libads/kerberos.c
@@ -541,13 +541,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);
 	}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list