Bug 700450 - Resource leaks revealed by Coverity scan.
Summary: Resource leaks revealed by Coverity scan.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rsync
Version: 5.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Vojtech Vitek
QA Contact: Aleš Mareček
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-28 12:49 UTC by Michal Luscon
Modified: 2015-03-04 23:57 UTC (History)
5 users (show)

Fixed In Version: rsync-3.0.6-4.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1024808 (view as bug list)
Environment:
Last Closed: 2011-07-21 10:49:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed patch for 2nd leak (4.62 KB, patch)
2011-05-31 07:49 UTC, Jan Kaluža
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 724041 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Product Errata RHSA-2011:0999 0 normal SHIPPED_LIVE Moderate: rsync security, bug fix, and enhancement update 2011-07-21 10:48:19 UTC

Internal Links: 724041

Description Michal Luscon 2011-04-28 12:49:32 UTC
1. Function "file_struct" in /flist.c:1326 returns NULL without deallocation variable file.

flist.c:1332: file = make_file(fname, flist, stp, flags, filter_level);
flist.c:1362, 1392, 1406, 1424, 1433: return without free.

2. Missing deallocations in fucntion "start_client"(/main.c:1107).

Function "check_for_hostspec" allocates memory to its second parameter and
this memory is not freed(/main.c:1211, 1122, 1199, 1162)


Version-Release number of selected component (if applicable):
3.0.6


Additional info: These defects were not present in current supported version of rsync package.

Comment 2 Vojtech Vitek 2011-04-28 14:51:15 UTC
Confirmed, both resource leaks are also in rsync 3.0.8. I will send the patches upstream.

Comment 7 Jan Kaluža 2011-05-31 07:49:48 UTC
Created attachment 501933 [details]
proposed patch for 2nd leak

Comment 12 errata-xmlrpc 2011-07-21 10:49:12 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0999.html

Comment 13 Matthias Saou 2011-07-25 12:27:00 UTC
I've tracked down the issue reported in bug #724041 to rsync-3.0.6-free-hostnames.patch which seems to be related to this report.


Note You need to log in before you can comment on or make changes to this bug.