[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Fri Aug 15 08:54:02 UTC 2025


The branch, master has been updated
       via  7b5cc7d37f1 lib: Fix memory leak CID#1469247
      from  8e8848280af lib:util: Fix resourse leak CID#1412633

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


- Log -----------------------------------------------------------------
commit 7b5cc7d37f11347a606a4a9fe7f44ae43193318d
Author: Vinit Agnihotri <vagnihot at redhat.com>
Date:   Tue Aug 12 11:32:00 2025 +0530

    lib: Fix memory leak CID#1469247
    
    pointer 'p' gets duplicated in file_lines_parse(), but not free'd
    before returning.
    
    Signed-off-by: Vinit Agnihotri <vagnihot at redhat.com>
    Reviewed-by: Anoop C S <anoopcs at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Fri Aug 15 08:53:53 UTC 2025 on atb-devel-224

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

Summary of changes:
 source3/lib/util_file.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/util_file.c b/source3/lib/util_file.c
index 5d6afc3c0b1..21a6559fc43 100644
--- a/source3/lib/util_file.c
+++ b/source3/lib/util_file.c
@@ -178,11 +178,14 @@ char **file_lines_ploadv(TALLOC_CTX *mem_ctx,
 {
 	char *p = NULL;
 	size_t size;
+	char **ret = NULL;
 
 	p = file_ploadv(argl, &size);
 	if (!p) {
 		return NULL;
 	}
 
-	return file_lines_parse(p, size, numlines, mem_ctx);
+	ret = file_lines_parse(p, size, numlines, mem_ctx);
+	TALLOC_FREE(p);
+	return ret;
 }


-- 
Samba Shared Repository



More information about the samba-cvs mailing list