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 <[email protected]>
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 <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
Reviewed-by: Volker Lendecke <[email protected]>
Autobuild-User(master): Volker Lendecke <[email protected]>
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