samba-cvs.cvs
[Top] [All Lists]

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alp

Subject: [SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-844-gc2f7f1b
From: Volker Lendecke
Date: Fri, 13 Feb 2009 03:16:20 -0600 CST
The branch, master has been updated
       via  c2f7f1b40b20e20fbc111fba59adc49a35f4fda0 (commit)
       via  83c2f028d81a6b481ecd439494dd7c52b1e1b1ff (commit)
       via  6e19b22c5a208351e570fc09fbf2f0b9eb975b2e (commit)
       via  4d100f2f6a832a70f9e481904ece4f7c9f090730 (commit)
      from  0ccdb5f74a0cbb97f3028101ea606f00bd1f73d8 (commit)

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


- Log -----------------------------------------------------------------
commit c2f7f1b40b20e20fbc111fba59adc49a35f4fda0
Author: Volker Lendecke <vl@xxxxxxxxx>
Date:   Fri Feb 13 10:19:26 2009 +0100

    Fix Coverity ID 707 (RESOURCE_LEAK)

commit 83c2f028d81a6b481ecd439494dd7c52b1e1b1ff
Author: Volker Lendecke <vl@xxxxxxxxx>
Date:   Fri Feb 13 10:11:57 2009 +0100

    Fix Coverity ID 742 (RESOURCE_LEAK)

commit 6e19b22c5a208351e570fc09fbf2f0b9eb975b2e
Author: Volker Lendecke <vl@xxxxxxxxx>
Date:   Fri Feb 13 10:08:37 2009 +0100

    Fix Coverity ID 744
    
    This was marked as a resource leak. This change makes the code a bit clearer
    that we always free error_string.

commit 4d100f2f6a832a70f9e481904ece4f7c9f090730
Author: Volker Lendecke <vl@xxxxxxxxx>
Date:   Fri Feb 13 10:06:14 2009 +0100

    Fix Coverity ID 745 (RESOURCE_LEAK)

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

Summary of changes:
 lib/util/util.c              |    1 +
 source3/utils/net_rpc_join.c |    9 +++------
 source3/utils/ntlm_auth.c    |    3 ++-
 3 files changed, 6 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/util.c b/lib/util/util.c
index 7548d30..40ac7f7 100644
--- a/lib/util/util.c
+++ b/lib/util/util.c
@@ -206,6 +206,7 @@ _PUBLIC_ char *get_myname(void)
        /* get my host name */
        if (gethostname(hostname, MAXHOSTNAMELEN+1) == -1) {
                DEBUG(0,("gethostname failed\n"));
+               free(hostname);
                return NULL;
        } 
 
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c
index 0c363d3..1c45d0c 100644
--- a/source3/utils/net_rpc_join.c
+++ b/source3/utils/net_rpc_join.c
@@ -481,7 +481,6 @@ done:
  **/
 int net_rpc_testjoin(struct net_context *c, int argc, const char **argv)
 {
-       char *domain = smb_xstrdup(c->opt_target_workgroup);
        NTSTATUS nt_status;
 
        if (c->display_usage) {
@@ -492,15 +491,13 @@ int net_rpc_testjoin(struct net_context *c, int argc, 
const char **argv)
        }
 
        /* Display success or failure */
-       nt_status = net_rpc_join_ok(c, domain, NULL, NULL);
+       nt_status = net_rpc_join_ok(c, c->opt_target_workgroup, NULL, NULL);
        if (!NT_STATUS_IS_OK(nt_status)) {
                fprintf(stderr,"Join to domain '%s' is not valid: %s\n",
-                       domain, nt_errstr(nt_status));
-               free(domain);
+                       c->opt_target_workgroup, nt_errstr(nt_status));
                return -1;
        }
 
-       printf("Join to '%s' is OK\n",domain);
-       free(domain);
+       printf("Join to '%s' is OK\n", c->opt_target_workgroup);
        return 0;
 }
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index b94efc9..ab5a743 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -558,6 +558,7 @@ static NTSTATUS winbind_pw_check(struct ntlmssp_state 
*ntlmssp_state, DATA_BLOB
                ntlmssp_state->auth_context = NULL;
        }
 
+       SAFE_FREE(error_string);
        SAFE_FREE(unix_name);
        return nt_status;
 }
@@ -1816,7 +1817,6 @@ static void manage_ntlm_server_1_request(struct 
ntlm_auth_state *state,
 
                                x_fprintf(x_stdout, "Authenticated: No\n");
                                x_fprintf(x_stdout, "Authentication-Error: 
%s\n.\n", error_string);
-                               SAFE_FREE(error_string);
                        } else {
                                static char zeros[16];
                                char *hex_lm_key;
@@ -1844,6 +1844,7 @@ static void manage_ntlm_server_1_request(struct 
ntlm_auth_state *state,
                                        TALLOC_FREE(hex_user_session_key);
                                }
                        }
+                       SAFE_FREE(error_string);
                }
                /* clear out the state */
                challenge = data_blob_null;


-- 
Samba Shared Repository

<Prev in Thread] Current Thread [Next in Thread>
  • [SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-844-gc2f7f1b, Volker Lendecke <=