Commit edd9066d authored by Frédéric Delanoy's avatar Frédéric Delanoy Committed by Alexandre Julliard

setupapi: Correctly handle errors in fake_dlls_callback (Coverity).

parent 882d126d
...@@ -701,7 +701,6 @@ static BOOL register_dlls_callback( HINF hinf, PCWSTR field, void *arg ) ...@@ -701,7 +701,6 @@ static BOOL register_dlls_callback( HINF hinf, PCWSTR field, void *arg )
static BOOL fake_dlls_callback( HINF hinf, PCWSTR field, void *arg ) static BOOL fake_dlls_callback( HINF hinf, PCWSTR field, void *arg )
{ {
INFCONTEXT context; INFCONTEXT context;
BOOL ret = TRUE;
BOOL ok = SetupFindFirstLineW( hinf, field, NULL, &context ); BOOL ok = SetupFindFirstLineW( hinf, field, NULL, &context );
for (; ok; ok = SetupFindNextLine( &context, &context )) for (; ok; ok = SetupFindNextLine( &context, &context ))
...@@ -730,9 +729,8 @@ static BOOL fake_dlls_callback( HINF hinf, PCWSTR field, void *arg ) ...@@ -730,9 +729,8 @@ static BOOL fake_dlls_callback( HINF hinf, PCWSTR field, void *arg )
done: done:
HeapFree( GetProcessHeap(), 0, path ); HeapFree( GetProcessHeap(), 0, path );
if (!ret) break;
} }
return ret; return TRUE;
} }
/*********************************************************************** /***********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment