Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 684009

Summary: memory leak in microcode_ctl.patch
Product: Red Hat Enterprise Linux 6 Reporter: Kamil Dudka <kdudka>
Component: microcode_ctlAssignee: Anton Arapov <anton>
Status: CLOSED ERRATA QA Contact: Evan McNabb <emcnabb>
Severity: low Docs Contact:
Priority: medium    
Version: 6.2CC: nobody
Target Milestone: rc   
Target Release: 6.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: microcode_ctl-1.17-5.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 690414 (view as bug list) Environment:
Last Closed: 2011-12-06 11:57:07 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:
Bug Depends On:    
Bug Blocks: 690414    
Attachments:
Description Flags
proposed fix
none
microcode_ctl.patch with a memleak fix included none

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