[Bug 1967] Potential memory leak in ssh [detected by melton]

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Sat Dec 31 01:44:17 EST 2011


--- Comment #4 from Zhenbo Xu <zhenbo1987 at gmail.com> 2011-12-31 01:44:17 EST ---

This report means that the heap object allocated to fwd.connect_host 
by function "parse_forward" is not freed at the end of the function
since fwd is a local variable.


In this report, the loop below iterates two times. At the first
iteration, a heap object is allocated to options->user at "charptr =
&options->user; ... *charptr = xstrdup(arg);", which is leaked at the
second iteration if options->user is reassigned.

while (fgets(line, sizeof(line), f)) {
  if (process_config_line(options, host, line, filename, linenum,
&active) != 0)

Here is a list of some bugs, most of which are confirmed as false
alarms by myself. It may contain some potential bugs or be helpful with
you, although most of these are useless or can be eliminated by
improving our tool.

Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.

More information about the openssh-bugs mailing list