Bug 684009 - memory leak in microcode_ctl.patch
Summary: memory leak in microcode_ctl.patch
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: microcode_ctl
Version: 6.2
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: rc
: 6.2
Assignee: Anton Arapov
QA Contact: Evan McNabb
URL:
Whiteboard:
Depends On:
Blocks: 690414
TreeView+ depends on / blocked
 
Reported: 2011-03-10 21:48 UTC by Kamil Dudka
Modified: 2014-06-18 08:03 UTC (History)
1 user (show)

Fixed In Version: microcode_ctl-1.17-5.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 690414 (view as bug list)
Environment:
Last Closed: 2011-12-06 11:57:07 UTC
Target Upstream Version:


Attachments (Terms of Use)
proposed fix (1.59 KB, patch)
2011-03-11 08:19 UTC, Kamil Dudka
no flags Details | Diff
microcode_ctl.patch with a memleak fix included (2.84 KB, patch)
2011-03-24 09:45 UTC, Anton Arapov
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:1594 0 normal SHIPPED_LIVE microcode_ctl bug fix and enhancement update 2011-12-06 00:38:46 UTC

Description Kamil Dudka 2011-03-10 21:48:24 UTC
Description of problem:
The patch introduces a call of malloc(), but never calls free().


Version-Release number of selected component (if applicable):
microcode_ctl-1.17-4.el6

Comment 2 RHEL Program Management 2011-03-10 22:02:38 UTC
Since this issue was entered in bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 4 Kamil Dudka 2011-03-11 08:19:48 UTC
Created attachment 483660 [details]
proposed fix

Comment 5 Anton Arapov 2011-03-24 09:45:49 UTC
Created attachment 487268 [details]
microcode_ctl.patch with a memleak fix included

$ sudo valgrind /sbin/microcode_ctl -u
==5757== LEAK SUMMARY:
==5757==    definitely lost: 8,000,000 bytes in 1 blocks

$ sudo valgrind /sbin/microcode_ctl -u
==5824== HEAP SUMMARY:
==5824==     in use at exit: 0 bytes in 0 blocks
==5824==   total heap usage: 2 allocs, 2 frees, 8,000,568 bytes allocated
==5824== All heap blocks were freed -- no leaks are possible

Comment 9 Evan McNabb 2011-08-16 18:11:13 UTC
Confirmed leak fixed in microcode_ctl-1.17-8.el6:

# rpm -q microcode_ctl
microcode_ctl-1.17-4.el6.x86_64
# sudo valgrind /sbin/microcode_ctl -u
...
==2742== LEAK SUMMARY:
==2742==    definitely lost: 0 bytes in 0 blocks
==2742==    indirectly lost: 0 bytes in 0 blocks
==2742==      possibly lost: 8,000,000 bytes in 1 blocks
...


# rpm -q microcode_ctl
microcode_ctl-1.17-8.el6.x86_64
# sudo valgrind /sbin/microcode_ctl -u
...
==2858== HEAP SUMMARY:
==2858==     in use at exit: 0 bytes in 0 blocks
==2858==   total heap usage: 2 allocs, 2 frees, 8,000,568 bytes allocated
==2858== 
==2858== All heap blocks were freed -- no leaks are possible
...

Comment 10 errata-xmlrpc 2011-12-06 11:57:07 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.

http://rhn.redhat.com/errata/RHEA-2011-1594.html


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