[PATCH] wined3d: Fixed sizeof (Coverity)

Marcus Meissner marcus at jet.franken.de
Sun Oct 16 16:11:48 CDT 2011


Change sizeof to match assigned value.
CID 3806

Ciao, Marcus
---
 dlls/wined3d/swapchain.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 126a991..1678dce 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -987,7 +987,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, WINED3DSURFTY
 
         const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
 
-        swapchain->context = HeapAlloc(GetProcessHeap(), 0, sizeof(swapchain->context));
+        swapchain->context = HeapAlloc(GetProcessHeap(), 0, sizeof(*swapchain->context));
         if (!swapchain->context)
         {
             ERR("Failed to create the context array.\n");
-- 
1.7.3.4




More information about the wine-patches mailing list