[Bug 12173] New: memory leak around poptGetOptArg()

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 12173] New: memory leak around poptGetOptArg()

samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=12173

            Bug ID: 12173
           Summary: memory leak around poptGetOptArg()
           Product: rsync
           Version: 3.0.6
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: core
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]

Description of problem:
    In poptGetOptArg(), con->os->nextArg is set to be NULL, which means the
returned memory is out of popt management.
    We have to free it.

Version-Release number of selected component (if applicable):
    rsync 3.0.6
    (perhaps the latest version is also affected, according to the source code)

How reproducible:
    always, with "--chmod=u+x" flag

Steps to Reproduce:
    valgrind --tool=memcheck rsync --chmod=u+x

Actual results:
    valgrind indicates memory leak.

Expected results:
    no memory leak, at least no big ones.

Additional info:
    Carefully read, it looks like POPT_ARG_STRING values also have to be freed
(such as shell_cmd and logfile_name).
    But since they are global variables, they are represented as "still
reachable".
    Further investigation is required for this side.

--
You are receiving this mail because:
You are the QA Contact for the bug.

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Reply | Threaded
Open this post in threaded view
|

[Bug 12173] memory leak around poptGetOptArg()

Samba - rsync mailing list
https://bugzilla.samba.org/show_bug.cgi?id=12173

T Yamada <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|3.0.6                       |3.1.1

--- Comment #1 from T Yamada <[hidden email]> ---
3.1.1 is still affected. How is it going?

==22846== 4 bytes in 1 blocks are definitely lost in loss record 2 of 8
==22846==    at 0x4C28BED: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22846==    by 0x524049E: ??? (in /lib/x86_64-linux-gnu/libpopt.so.0.0.0)
==22846==    by 0x5241994: poptGetNextOpt (in
/lib/x86_64-linux-gnu/libpopt.so.0.0.0)
==22846==    by 0x13AE04: ??? (in /usr/bin/rsync)
==22846==    by 0x114D7E: main (in /usr/bin/rsync)
==22846==
==22846== LEAK SUMMARY:
==22846==    definitely lost: 4 bytes in 1 blocks
==22846==    indirectly lost: 0 bytes in 0 blocks
==22846==      possibly lost: 0 bytes in 0 blocks
==22846==    still reachable: 890 bytes in 7 blocks
==22846==         suppressed: 0 bytes in 0 blocks

--
You are receiving this mail because:
You are the QA Contact for the bug.

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Reply | Threaded
Open this post in threaded view
|

[Bug 12173] memory leak around poptGetOptArg()

Samba - rsync mailing list
In reply to this post by samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=12173

--- Comment #2 from Paul Slootman <[hidden email]> ---
I think there are more urgent problems than a memory leak of less than 1kB,
which I expect isn't really a leak but memory which isn't freed at the end of
execution but may be used up to that time. So is it really a leak or a bit of
bad housekeeping which doesn't matter at all?

--
You are receiving this mail because:
You are the QA Contact for the bug.

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Reply | Threaded
Open this post in threaded view
|

[Bug 12173] memory leak around poptGetOptArg()

Samba - rsync mailing list
In reply to this post by samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=12173

--- Comment #3 from T Yamada <[hidden email]> ---
> definitely lost: 4 bytes in 1 blocks
For entire program.
But maybe this priority is low.

--
You are receiving this mail because:
You are the QA Contact for the bug.

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html