Alistair Leslie-Hughes : gameux: Fix memory leaks (Valgrind).

Alexandre Julliard julliard at wine.codeweavers.com
Wed Nov 11 08:36:44 CST 2015


Module: wine
Branch: master
Commit: 5e3d9616e43da5c9fda62365738032c9df606468
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5e3d9616e43da5c9fda62365738032c9df606468

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Wed Nov 11 14:44:03 2015 +1100

gameux: Fix memory leaks (Valgrind).

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gameux/gamestatistics.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/gameux/gamestatistics.c b/dlls/gameux/gamestatistics.c
index e6e33bb..b9e913e 100644
--- a/dlls/gameux/gamestatistics.c
+++ b/dlls/gameux/gamestatistics.c
@@ -264,7 +264,7 @@ static HRESULT GAMEUX_updateStatisticsFile(struct GAMEUX_STATS *stats)
                     }
 
                     if(SUCCEEDED(hr))
-                        hr = IXMLDOMNode_appendChild(categoryNode, statisticsNode, &statisticsNode);
+                        hr = IXMLDOMNode_appendChild(categoryNode, statisticsNode, NULL);
 
                     IXMLDOMElement_Release(statisticsElement);
                     IXMLDOMNode_Release(statisticsNode);
@@ -578,6 +578,8 @@ static HRESULT GAMEUX_loadStatisticsFromFile(struct GAMEUX_STATS *data)
                             }
                         }
 
+                        IXMLDOMNodeList_Release(categoryChildren);
+
                         if(SUCCEEDED(hr))
                             hr = S_OK;
                     }




More information about the wine-cvs mailing list