Bug 1011817 - bridge monitor file forgets to close a file
Summary: bridge monitor file forgets to close a file
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: iproute
Version: 6.5
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Pavel Šimerda (pavlix)
QA Contact: Jaroslav Aster
URL: http://thread.gmane.org/gmane.linux.n...
Depends On:
TreeView+ depends on / blocked
Reported: 2013-09-25 08:08 UTC by Petr Pisar
Modified: 2015-07-22 06:40 UTC (History)
6 users (show)

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.
Clone Of:
: 1011818 1011822 (view as bug list)
Last Closed: 2015-07-22 06:40:31 UTC
Target Upstream Version:

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

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1331 0 normal SHIPPED_LIVE iproute bug fix and enhancement update 2015-07-20 17:53:02 UTC

Description Petr Pisar 2013-09-25 08:08:56 UTC
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 08:09:47 UTC
Created attachment 802634 [details]
Proposed fix

Comment 2 Petr Pisar 2013-10-01 13:55:55 UTC
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 14:06:06 UTC
Created attachment 805990 [details]
Upstream fix

Comment 12 errata-xmlrpc 2015-07-22 06:40:31 UTC
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.