[Bug 3403] New: Memory leak

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Sat Mar 12 12:35:30 AEDT 2022


https://bugzilla.mindrot.org/show_bug.cgi?id=3403

            Bug ID: 3403
           Summary: Memory leak
           Product: Portable OpenSSH
           Version: 8.9p1
          Hardware: Other
                OS: Windows 10
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: scp
          Assignee: unassigned-bugs at mindrot.org
          Reporter: balu.gajjala at gmail.com

In the else loop, the args.list is set to NULL without releasing memory
resulting in a memory leak.

static struct sftp_conn *
do_sftp_connect(char *host, char *user, int port, char *sftp_direct,
   int *reminp, int *remoutp, int *pidp)
{
        if (sftp_direct == NULL) {
                if (do_cmd(ssh_program, host, user, port, 1, "sftp",
                    reminp, remoutp, pidp) < 0)
                        return NULL;

        } else {
                args.list = NULL;
                addargs(&args, "sftp-server");
                if (do_cmd(sftp_direct, host, NULL, -1, 0, "sftp",
                    reminp, remoutp, pidp) < 0)
                        return NULL;
        }
        return do_init(*reminp, *remoutp, 32768, 64, limit_kbps);
}

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list