fwts: memory leak when reading MSRs when checking if check if CPU has C1E bit

Bug #1549723 reported by Colin Ian King
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Firmware Test Suite
Fix Released
Low
Colin Ian King

Bug Description

Resource leak on failed MSR read. Minor issue, should be fixed.

226 if (fwts_cpu_readmsr(0, MSR_AMD64_OSVW_STATUS, &val) != FWTS_OK)
   CID 1351543 (#2 of 2): Resource leak (RESOURCE_LEAK)11. leaked_storage: Variable cpu going out of scope leaks the storage it points to.
227 return FWTS_BOOL_ERROR;
228 if (!(val & 2)) {
229 fwts_cpu_free_info(cpu);
230 return FWTS_FALSE;

affects: plainbox-provider-checkbox → fwts
Changed in fwts:
status: New → In Progress
importance: Undecided → Low
assignee: nobody → Colin Ian King (colin-king)
Revision history for this message
Colin Ian King (colin-king) wrote :

I also noticed that we need to fix the case when family 0x0f models < rev F do not have C1E, the code was erroneously returning true instead of false.

Revision history for this message
Colin Ian King (colin-king) wrote :
Revision history for this message
Colin Ian King (colin-king) wrote :
Changed in fwts:
status: In Progress → Fix Committed
Changed in fwts:
milestone: none → 16.03.00
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.