Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
850f6c79
Commit
850f6c79
authored
May 16, 2009
by
Michael Stefaniuc
Committed by
Alexandre Julliard
May 18, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf: Allocate memory only right before it's needed.
Fixes a memory leak on an error path. Found by Smatch.
parent
d39dd383
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
msctf.c
dlls/msctf/msctf.c
+8
-8
No files found.
dlls/msctf/msctf.c
View file @
850f6c79
...
...
@@ -358,14 +358,6 @@ HRESULT add_active_textservice(TF_LANGUAGEPROFILE *lp)
actsvr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
ActivatedTextService
));
if
(
!
actsvr
)
return
E_OUTOFMEMORY
;
entry
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
AtsEntry
));
if
(
!
entry
)
{
HeapFree
(
GetProcessHeap
(),
0
,
actsvr
);
return
E_OUTOFMEMORY
;
}
ITfThreadMgr_QueryInterface
(
tm
,
&
IID_ITfClientId
,(
LPVOID
)
&
clientid
);
ITfClientId_GetClientId
(
clientid
,
&
lp
->
clsid
,
&
actsvr
->
tid
);
ITfClientId_Release
(
clientid
);
...
...
@@ -404,6 +396,14 @@ HRESULT add_active_textservice(TF_LANGUAGEPROFILE *lp)
if
(
activated
>
0
)
activate_given_ts
(
actsvr
,
tm
);
entry
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
AtsEntry
));
if
(
!
entry
)
{
HeapFree
(
GetProcessHeap
(),
0
,
actsvr
);
return
E_OUTOFMEMORY
;
}
entry
->
ats
=
actsvr
;
list_add_head
(
&
AtsList
,
&
entry
->
entry
);
...
...
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