wbemprox: Fix some memory leaks (Coverity).

This commit is contained in:
Hans Leidekker 2015-06-22 12:13:30 +02:00 committed by Alexandre Julliard
parent 597c5f9c4b
commit 13490899f1
1 changed files with 4 additions and 4 deletions

View File

@ -1586,6 +1586,8 @@ static enum fill_status fill_datafile( struct table *table, const struct expr *c
for (;;) for (;;)
{ {
heap_free( glob );
heap_free( path );
path = pop_dir( dirstack, &len ); path = pop_dir( dirstack, &len );
if (!(glob = build_glob( root[0], path, len ))) if (!(glob = build_glob( root[0], path, len )))
{ {
@ -1635,8 +1637,6 @@ static enum fill_status fill_datafile( struct table *table, const struct expr *c
FindClose( handle ); FindClose( handle );
} }
if (!peek_dir( dirstack )) break; if (!peek_dir( dirstack )) break;
heap_free( glob );
heap_free( path );
} }
} }
@ -1678,6 +1678,8 @@ static enum fill_status fill_directory( struct table *table, const struct expr *
for (;;) for (;;)
{ {
heap_free( glob );
heap_free( path );
path = pop_dir( dirstack, &len ); path = pop_dir( dirstack, &len );
if (!(glob = build_glob( root[0], path, len ))) if (!(glob = build_glob( root[0], path, len )))
{ {
@ -1728,8 +1730,6 @@ static enum fill_status fill_directory( struct table *table, const struct expr *
FindClose( handle ); FindClose( handle );
} }
if (!peek_dir( dirstack )) break; if (!peek_dir( dirstack )) break;
heap_free( glob );
heap_free( path );
} }
} }