Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7ef99635
Commit
7ef99635
authored
Nov 23, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/static: Use CRT allocation functions.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
a1f4a2d1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
static.c
dlls/comctl32/static.c
+6
-6
No files found.
dlls/comctl32/static.c
View file @
7ef99635
...
...
@@ -29,6 +29,7 @@
*/
#include <stdarg.h>
#include <stdlib.h>
#include "windef.h"
#include "winbase.h"
...
...
@@ -37,7 +38,6 @@
#include "commctrl.h"
#include "uxtheme.h"
#include "wine/heap.h"
#include "wine/debug.h"
#include "comctl32.h"
...
...
@@ -94,7 +94,7 @@ static struct static_extra_info *get_extra_ptr( HWND hwnd, BOOL force )
struct
static_extra_info
*
extra
=
(
struct
static_extra_info
*
)
GetWindowLongPtrW
(
hwnd
,
0
);
if
(
!
extra
&&
force
)
{
extra
=
heap_alloc_zero
(
sizeof
(
*
extra
)
);
extra
=
calloc
(
1
,
sizeof
(
*
extra
)
);
if
(
extra
)
SetWindowLongPtrW
(
hwnd
,
0
,
(
ULONG_PTR
)
extra
);
}
...
...
@@ -470,7 +470,7 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam,
{
if
(
extra
->
image_has_alpha
)
DeleteObject
(
extra
->
image
.
hbitmap
);
heap_
free
(
extra
);
free
(
extra
);
}
/*
* FIXME
...
...
@@ -751,13 +751,13 @@ static void STATIC_PaintTextfn( HWND hwnd, HDC hdc, HBRUSH hbrush, DWORD style )
}
buf_size
=
256
;
if
(
!
(
text
=
HeapAlloc
(
GetProcessHeap
(),
0
,
buf_size
*
sizeof
(
WCHAR
)
)))
if
(
!
(
text
=
malloc
(
buf_size
*
sizeof
(
WCHAR
)
)))
goto
no_TextOut
;
while
((
len
=
InternalGetWindowText
(
hwnd
,
text
,
buf_size
))
==
buf_size
-
1
)
{
buf_size
*=
2
;
if
(
!
(
text
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
text
,
buf_size
*
sizeof
(
WCHAR
)
)))
if
(
!
(
text
=
realloc
(
text
,
buf_size
*
sizeof
(
WCHAR
)
)))
goto
no_TextOut
;
}
...
...
@@ -777,7 +777,7 @@ static void STATIC_PaintTextfn( HWND hwnd, HDC hdc, HBRUSH hbrush, DWORD style )
}
no_TextOut:
HeapFree
(
GetProcessHeap
(),
0
,
text
);
free
(
text
);
if
(
hFont
)
SelectObject
(
hdc
,
hOldFont
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment