Andrew Talbot : oleview: Fix a memory leak.

Alexandre Julliard julliard at winehq.org
Thu Oct 18 07:59:31 CDT 2007


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

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Wed Oct 17 21:15:53 2007 +0100

oleview: Fix a memory leak.

---

 programs/oleview/pane.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/programs/oleview/pane.c b/programs/oleview/pane.c
index 54ac274..f274be8 100644
--- a/programs/oleview/pane.c
+++ b/programs/oleview/pane.c
@@ -151,7 +151,11 @@ BOOL CreatePanedWindow(HWND hWnd, HWND *hWndCreated, HINSTANCE hInst)
     pane = HeapAlloc(GetProcessHeap(), 0, sizeof(PANE));
     *hWndCreated = CreateWindow(wszPaneClass, NULL, WS_CHILD|WS_VISIBLE,
             CW_USEDEFAULT, CW_USEDEFAULT, 0, 0,    hWnd, (HMENU)pane, hInst, NULL);
-    if(!hWndCreated) return FALSE;
+    if(!hWndCreated)
+    {
+        HeapFree(GetProcessHeap(), 0, pane);
+        return FALSE;
+    }
 
     pane->left = NULL;
     pane->right = NULL;




More information about the wine-cvs mailing list