Bug 700450 - Resource leaks revealed by Coverity scan.
Resource leaks revealed by Coverity scan.
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rsync (Show other bugs)
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Vojtech Vitek
Aleš Mareček
Depends On:
  Show dependency treegraph
Reported: 2011-04-28 08:49 EDT by Michal Luscon
Modified: 2015-03-04 18:57 EST (History)
5 users (show)

See Also:
Fixed In Version: rsync-3.0.6-4.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1024808 (view as bug list)
Last Closed: 2011-07-21 06:49:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Michal Luscon 2011-04-28 08:49:32 EDT
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):

Additional info: These defects were not present in current supported version of rsync package.
Comment 2 Vojtech Vitek 2011-04-28 10:51:15 EDT
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 03:49:48 EDT
Created attachment 501933 [details]
proposed patch for 2nd leak
Comment 12 errata-xmlrpc 2011-07-21 06:49:12 EDT
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.

Comment 13 Matthias Saou 2011-07-25 08:27:00 EDT
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.