comctl32/tests: Fix a leak in rebar test data allocation (Valgrind).
This commit is contained in:
parent
e61fd95146
commit
6869f89a30
|
@ -208,17 +208,16 @@ typedef struct {
|
|||
|
||||
static rbsize_result_t rbsize_init(int cleft, int ctop, int cright, int cbottom, int cyBarHeight, int nRows, int nBands)
|
||||
{
|
||||
rbsize_result_t *temp;
|
||||
rbsize_result_t ret;
|
||||
|
||||
temp = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(rbsize_result_t));
|
||||
SetRect(&temp->rcClient, cleft, ctop, cright, cbottom);
|
||||
temp->cyBarHeight = cyBarHeight;
|
||||
temp->nRows = 0;
|
||||
temp->cyRowHeights = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nRows*sizeof(int));
|
||||
temp->nBands = 0;
|
||||
temp->bands = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nBands*sizeof(rbband_result_t));
|
||||
SetRect(&ret.rcClient, cleft, ctop, cright, cbottom);
|
||||
ret.cyBarHeight = cyBarHeight;
|
||||
ret.nRows = 0;
|
||||
ret.cyRowHeights = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nRows*sizeof(int));
|
||||
ret.nBands = 0;
|
||||
ret.bands = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nBands*sizeof(rbband_result_t));
|
||||
|
||||
return *temp;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void rbsize_add_row(rbsize_result_t *rbsr, int rowHeight) {
|
||||
|
@ -234,7 +233,7 @@ static void rbsize_add_band(rbsize_result_t *rbsr, int left, int top, int right,
|
|||
rbsr->nBands++;
|
||||
}
|
||||
|
||||
static rbsize_result_t *rbsize_results = NULL;
|
||||
static rbsize_result_t *rbsize_results;
|
||||
|
||||
#define rbsize_results_num 27
|
||||
|
||||
|
|
Loading…
Reference in New Issue