[DXDIAG]
authorChristoph von Wittich <christoph_vw@reactos.org>
Tue, 14 Apr 2015 07:41:24 +0000 (07:41 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Tue, 14 Apr 2015 07:41:24 +0000 (07:41 +0000)
fix some memory leaks

svn path=/trunk/; revision=67189

reactos/base/applications/dxdiag/dxdiag.c

index 096b276..ae2bd20 100644 (file)
@@ -288,6 +288,11 @@ DxDiagWndProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
             break;
         case WM_DESTROY:
             DestroyTabCtrlDialogs(pContext);
+            if (pContext->hDisplayWnd)
+                HeapFree(GetProcessHeap(), 0, pContext->hDisplayWnd);
+            if (pContext->hSoundWnd)
+                HeapFree(GetProcessHeap(), 0, pContext->hSoundWnd);
+            HeapFree(GetProcessHeap(), 0, pContext);
             return DefWindowProc(hwndDlg, message, wParam, lParam);
     }
     return 0;