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
0bbd6cb0
Commit
0bbd6cb0
authored
Apr 02, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 08, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gameux: Fix release/free of uninitialized pointers (Coverity).
parent
ab8cc4ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
gameexplorer.c
dlls/gameux/gameexplorer.c
+3
-1
gamestatistics.c
dlls/gameux/gamestatistics.c
+8
-7
No files found.
dlls/gameux/gameexplorer.c
View file @
0bbd6cb0
...
@@ -681,7 +681,7 @@ static HRESULT GAMEUX_UpdateGame(LPGUID InstanceID) {
...
@@ -681,7 +681,7 @@ static HRESULT GAMEUX_UpdateGame(LPGUID InstanceID) {
HRESULT
hr
;
HRESULT
hr
;
GAME_INSTALL_SCOPE
installScope
;
GAME_INSTALL_SCOPE
installScope
;
LPWSTR
lpRegistryPath
;
LPWSTR
lpRegistryPath
;
LPWSTR
lpGDFBinaryPath
,
lpGameInstallDirectory
;
LPWSTR
lpGDFBinaryPath
;
TRACE
(
"(%s)
\n
"
,
debugstr_guid
(
InstanceID
));
TRACE
(
"(%s)
\n
"
,
debugstr_guid
(
InstanceID
));
...
@@ -702,6 +702,8 @@ static HRESULT GAMEUX_UpdateGame(LPGUID InstanceID) {
...
@@ -702,6 +702,8 @@ static HRESULT GAMEUX_UpdateGame(LPGUID InstanceID) {
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
WCHAR
*
lpGameInstallDirectory
=
NULL
;
/* game found, it's registry path is in lpRegistryPath and install
/* game found, it's registry path is in lpRegistryPath and install
* scope in installScope */
* scope in installScope */
TRACE
(
"game found in registry (path %s), updating
\n
"
,
debugstr_w
(
lpRegistryPath
));
TRACE
(
"game found in registry (path %s), updating
\n
"
,
debugstr_w
(
lpRegistryPath
));
...
...
dlls/gameux/gamestatistics.c
View file @
0bbd6cb0
...
@@ -112,7 +112,7 @@ static HRESULT GAMEUX_updateStatisticsFile(struct GAMEUX_STATS *stats)
...
@@ -112,7 +112,7 @@ static HRESULT GAMEUX_updateStatisticsFile(struct GAMEUX_STATS *stats)
HRESULT
hr
=
S_OK
;
HRESULT
hr
=
S_OK
;
IXMLDOMDocument
*
document
;
IXMLDOMDocument
*
document
;
IXMLDOMElement
*
root
,
*
categoryElement
,
*
statisticsElement
;
IXMLDOMElement
*
root
,
*
statisticsElement
;
IXMLDOMNode
*
categoryNode
,
*
statisticsNode
;
IXMLDOMNode
*
categoryNode
,
*
statisticsNode
;
VARIANT
vStatsFilePath
,
vValue
;
VARIANT
vStatsFilePath
,
vValue
;
BSTR
bstrStatistics
=
NULL
,
bstrCategory
=
NULL
,
bstrIndex
=
NULL
,
BSTR
bstrStatistics
=
NULL
,
bstrCategory
=
NULL
,
bstrIndex
=
NULL
,
...
@@ -178,6 +178,8 @@ static HRESULT GAMEUX_updateStatisticsFile(struct GAMEUX_STATS *stats)
...
@@ -178,6 +178,8 @@ static HRESULT GAMEUX_updateStatisticsFile(struct GAMEUX_STATS *stats)
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
for
(
i
=
0
;
i
<
MAX_CATEGORIES
;
++
i
)
for
(
i
=
0
;
i
<
MAX_CATEGORIES
;
++
i
)
{
{
IXMLDOMElement
*
categoryElement
=
NULL
;
if
(
lstrlenW
(
stats
->
categories
[
i
].
sName
)
==
0
)
if
(
lstrlenW
(
stats
->
categories
[
i
].
sName
)
==
0
)
continue
;
continue
;
...
@@ -187,7 +189,7 @@ static HRESULT GAMEUX_updateStatisticsFile(struct GAMEUX_STATS *stats)
...
@@ -187,7 +189,7 @@ static HRESULT GAMEUX_updateStatisticsFile(struct GAMEUX_STATS *stats)
hr
=
IXMLDOMDocument_createNode
(
document
,
vValue
,
bstrCategory
,
NULL
,
&
categoryNode
);
hr
=
IXMLDOMDocument_createNode
(
document
,
vValue
,
bstrCategory
,
NULL
,
&
categoryNode
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
hr
=
IXMLDOMNode_QueryInterface
(
categoryNode
,
&
IID_IXMLDOMElement
,
(
LPVOID
*
)
&
categoryElement
);
hr
=
IXMLDOMNode_QueryInterface
(
categoryNode
,
&
IID_IXMLDOMElement
,
(
void
*
*
)
&
categoryElement
);
V_INT
(
&
vValue
)
=
i
;
V_INT
(
&
vValue
)
=
i
;
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
...
@@ -207,6 +209,9 @@ static HRESULT GAMEUX_updateStatisticsFile(struct GAMEUX_STATS *stats)
...
@@ -207,6 +209,9 @@ static HRESULT GAMEUX_updateStatisticsFile(struct GAMEUX_STATS *stats)
hr
=
IXMLDOMElement_setAttribute
(
categoryElement
,
bstrName
,
vValue
);
hr
=
IXMLDOMElement_setAttribute
(
categoryElement
,
bstrName
,
vValue
);
}
}
if
(
categoryElement
)
IXMLDOMElement_Release
(
categoryElement
);
SysFreeString
(
V_BSTR
(
&
vValue
));
SysFreeString
(
V_BSTR
(
&
vValue
));
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
...
@@ -269,7 +274,6 @@ static HRESULT GAMEUX_updateStatisticsFile(struct GAMEUX_STATS *stats)
...
@@ -269,7 +274,6 @@ static HRESULT GAMEUX_updateStatisticsFile(struct GAMEUX_STATS *stats)
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
hr
=
IXMLDOMElement_appendChild
(
root
,
categoryNode
,
&
categoryNode
);
hr
=
IXMLDOMElement_appendChild
(
root
,
categoryNode
,
&
categoryNode
);
IXMLDOMElement_Release
(
categoryElement
);
IXMLDOMNode_Release
(
categoryNode
);
IXMLDOMNode_Release
(
categoryNode
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
...
@@ -939,16 +943,13 @@ static HRESULT WINAPI GameStatisticsImpl_Save(
...
@@ -939,16 +943,13 @@ static HRESULT WINAPI GameStatisticsImpl_Save(
BOOL
trackChanges
)
BOOL
trackChanges
)
{
{
GameStatisticsImpl
*
This
=
impl_from_IGameStatistics
(
iface
);
GameStatisticsImpl
*
This
=
impl_from_IGameStatistics
(
iface
);
HRESULT
hr
=
S_OK
;
TRACE
(
"(%p, %d)
\n
"
,
This
,
trackChanges
);
TRACE
(
"(%p, %d)
\n
"
,
This
,
trackChanges
);
if
(
trackChanges
)
if
(
trackChanges
)
FIXME
(
"tracking changes not yet implemented
\n
"
);
FIXME
(
"tracking changes not yet implemented
\n
"
);
hr
=
GAMEUX_updateStatisticsFile
(
&
This
->
stats
);
return
GAMEUX_updateStatisticsFile
(
&
This
->
stats
);
return
hr
;
}
}
static
HRESULT
WINAPI
GameStatisticsImpl_SetLastPlayedCategory
(
static
HRESULT
WINAPI
GameStatisticsImpl_SetLastPlayedCategory
(
...
...
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