Bug 1011817 - bridge monitor file forgets to close a file
bridge monitor file forgets to close a file
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: iproute (Show other bugs)
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Pavel Šimerda (pavlix)
Jaroslav Aster
: EasyFix, Patch, Regression
Depends On:
  Show dependency treegraph
Reported: 2013-09-25 04:08 EDT by Petr Pisar
Modified: 2015-07-22 02:40 EDT (History)
6 users (show)

See Also:
Fixed In Version: iproute-2.6.32-42.el6
Doc Type: Bug Fix
Doc Text:
Running the "bridge monitor file" command opened the file, but never closed it. A fix has been applied to close the opened file after loading its content. As a result, the command now closes all opened files as expected.
Story Points: ---
Clone Of:
: 1011818 1011822 (view as bug list)
Last Closed: 2015-07-22 02:40:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Proposed fix (1.09 KB, patch)
2013-09-25 04:09 EDT, Petr Pisar
no flags Details | Diff
Upstream fix (1.09 KB, patch)
2013-10-01 10:06 EDT, Petr Pisar
no flags Details | Diff

  None (edit)
Description Petr Pisar 2013-09-25 04:08:56 EDT
Static analysis and valgrind show a memory leak in bridge(8) tool. The reason is a missing fclose(3) call:

> iproute2-2.6.31/bridge/monitor.c:140:leaked_storage – Variable "fp" going out of scope leaks the storage it points to. 

Proposed fix has been submitted to the upstream <http://thread.gmane.org/gmane.linux.network/284884>.
Comment 1 Petr Pisar 2013-09-25 04:09:47 EDT
Created attachment 802634 [details]
Proposed fix
Comment 2 Petr Pisar 2013-10-01 09:55:55 EDT
Patch accepted by upstream as:

commit 101847446e6a5e3ca370e65ebc462584934fce0e
Author: Petr Písař <ppisar@redhat.com>
Date:   Wed Sep 25 09:45:45 2013 +0200

    iproute2: bridge: Close file with bridge monitor file
Comment 3 Petr Pisar 2013-10-01 10:06:06 EDT
Created attachment 805990 [details]
Upstream fix
Comment 12 errata-xmlrpc 2015-07-22 02:40:31 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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