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:
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