Marcus Meissner : setupapi: Do not free stack pointers (Coverity).

Alexandre Julliard julliard at winehq.org
Wed Jan 1 14:24:21 CST 2014


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

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Wed Jan  1 19:53:26 2014 +0100

setupapi: Do not free stack pointers (Coverity).

---

 dlls/setupapi/query.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/setupapi/query.c b/dlls/setupapi/query.c
index e343835..f21bc36 100644
--- a/dlls/setupapi/query.c
+++ b/dlls/setupapi/query.c
@@ -607,7 +607,7 @@ BOOL WINAPI SetupGetTargetPathW( HINF hinf, PINFCONTEXT context, PCWSTR section,
         else
         {
             SetLastError( ERROR_INSUFFICIENT_BUFFER );
-            HeapFree( GetProcessHeap(), 0, dir );
+            if (dir != systemdir) HeapFree( GetProcessHeap(), 0, dir );
             return FALSE;
         }
     }




More information about the wine-cvs mailing list