msvcrt: [1/3] free correct buffer in pf_vsnprintf

Jesse Allen the3dfxdude at gmail.com
Mon Nov 13 21:51:17 CST 2006


-------------- next part --------------
diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c
index a7a014d..591f28f 100644
--- a/dlls/msvcrt/wcs.c
+++ b/dlls/msvcrt/wcs.c
@@ -667,7 +667,7 @@ static int pf_vsnprintf( pf_output *out,
 
             r = pf_output_format_A( out, x, -1, &flags );
             if( x != number )
-                HeapFree( GetProcessHeap(), 0, number );
+                HeapFree( GetProcessHeap(), 0, x );
         }
 
         /* deal with integers and floats using libc's printf */
@@ -687,7 +687,7 @@ static int pf_vsnprintf( pf_output *out,
 
             r = pf_output_stringA( out, x, -1 );
             if( x != number )
-                HeapFree( GetProcessHeap(), 0, number );
+                HeapFree( GetProcessHeap(), 0, x );
         }
         else
             continue;
-- 
1.4.2.1


More information about the wine-patches mailing list