Bug 700450

Summary: Resource leaks revealed by Coverity scan.
Product: Red Hat Enterprise Linux 5 Reporter: Michal Luscon <mluscon>
Component: rsyncAssignee: Vojtech Vitek <vvitek>
Status: CLOSED ERRATA QA Contact: Aleš Mareček <amarecek>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.7CC: amarecek, hripps, jkaluza, matthias, ovasik
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rsync-3.0.6-4.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1024808 (view as bug list) Environment:
Last Closed: 2011-07-21 10:49:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
proposed patch for 2nd leak none

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.