The branch, master has been updated
       via  634dc83d5ca lib/util: Fix CID 1414760 - Memory leak
      from  82dd1ee9e75 nsswitch: support all known DS lookup flags in 
wbclient's wbcLookupDomainController()

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


- Log -----------------------------------------------------------------
commit 634dc83d5ca5a703865b17d87487d3923d41be43
Author: Shweta Sodani <ssod...@redhat.com>
Date:   Mon Aug 4 17:09:23 2025 +0530

    lib/util: Fix CID 1414760 - Memory leak
    
    local variable 't' is reusing in child process, resulting the leaking
    the tfork object as a side effect.
    
    This fixes coverity issue#1414760
    
    Signed-off-by: Shweta Sodani <ssod...@redhat.com>
    Reviewed-by: Anoop C S <anoo...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>
    Reviewed-by: Vinit Agnihotri <vagni...@redhat.com>
    Reviewed-by: Shachar Sharon <ssha...@redhat.com>
    
    Autobuild-User(master): Anoop C S <anoo...@samba.org>
    Autobuild-Date(master): Tue Aug 12 09:32:19 UTC 2025 on atb-devel-224

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

Summary of changes:
 lib/util/tests/tfork.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/tests/tfork.c b/lib/util/tests/tfork.c
index 70ae97583fc..599ed7e4b52 100644
--- a/lib/util/tests/tfork.c
+++ b/lib/util/tests/tfork.c
@@ -373,14 +373,16 @@ static bool test_tfork_twice(struct torture_context *tctx)
        }
        child = tfork_child_pid(t);
        if (child == 0) {
+               struct tfork *t1 = NULL;
+
                close(up[0]);
 
-               t = tfork_create();
-               if (t == NULL) {
+               t1 = tfork_create();
+               if (t1 == NULL) {
                        torture_fail(tctx, "tfork failed\n");
                        return false;
                }
-               child = tfork_child_pid(t);
+               child = tfork_child_pid(t1);
                if (child == 0) {
                        sleep(1);
                        pid = getpid();
@@ -393,6 +395,8 @@ static bool test_tfork_twice(struct torture_context *tctx)
                        _exit(1);
                }
 
+               status = tfork_status(&t1, true);
+               torture_assert_goto(tctx, status != -1, ok, done, "tfork_status 
failed\n");
                _exit(0);
        }
 


-- 
Samba Shared Repository

Reply via email to