[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Sat Aug 28 06:16:04 MDT 2010


The branch, master has been updated
       via  15d0d9b s3: Fix a (highly unlikly) memleak in set_local_machine_name()
      from  460597d s3: Fix some DEBUGs

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


- Log -----------------------------------------------------------------
commit 15d0d9bcfbc1489725082a4e860f9d403a874d4d
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Aug 28 14:15:31 2010 +0200

    s3: Fix a (highly unlikly) memleak in set_local_machine_name()

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

Summary of changes:
 source3/lib/substitute.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c
index e655128..d7ca184 100644
--- a/source3/lib/substitute.c
+++ b/source3/lib/substitute.c
@@ -47,16 +47,16 @@ bool set_local_machine_name(const char *local_name, bool perm)
 	char *tmp_local_machine = NULL;
 	size_t len;
 
+	if (already_perm) {
+		return true;
+	}
+
 	tmp_local_machine = SMB_STRDUP(local_name);
 	if (!tmp_local_machine) {
 		return false;
 	}
 	trim_char(tmp_local_machine,' ',' ');
 
-	if (already_perm) {
-		return true;
-	}
-
 	SAFE_FREE(local_machine);
 	len = strlen(tmp_local_machine);
 	local_machine = SMB_CALLOC_ARRAY(char, len+1);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list