[SCM] Samba Shared Repository - branch master updated

Bo Yang boyang at samba.org
Mon Nov 30 04:15:50 MST 2009


The branch, master has been updated
       via  62a2732... s3: Fix crash in free_file_list().
      from  b03ad70... s3:docs: Document "enable core files".

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


- Log -----------------------------------------------------------------
commit 62a27325d99cf4371fe98d049110e585dd209c98
Author: Bo Yang <boyang at samba.org>
Date:   Mon Nov 30 17:30:25 2009 +0800

    s3: Fix crash in free_file_list().
    
    Signed-off-by: Bo Yang <boyang at samba.org>

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

Summary of changes:
 source3/param/loadparm.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 29e3a25..a1f5328 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -7016,6 +7016,7 @@ static void add_to_file_list(const char *fname, const char *subfname)
 		}
 		f->subfname = SMB_STRDUP(subfname);
 		if (!f->subfname) {
+			SAFE_FREE(f->name);
 			SAFE_FREE(f);
 			return;
 		}
@@ -7026,6 +7027,7 @@ static void add_to_file_list(const char *fname, const char *subfname)
 		if (t)
 			f->modtime = t;
 	}
+	return;
 }
 
 /**
@@ -7113,9 +7115,8 @@ bool lp_file_list_changed(void)
 					  ctime(&mod_time)));
 				f->modtime = mod_time;
 				SAFE_FREE(f->subfname);
-				f->subfname = n2; /* Passing ownership of
-						     return from alloc_sub_basic
-						     above. */
+				f->subfname = SMB_STRDUP(n2);
+				TALLOC_FREE(n2);
 				return true;
 			}
 			TALLOC_FREE(n2);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list