widl: Fix memory leaks.

This commit is contained in:
Andrew Talbot 2007-01-04 16:57:54 +00:00 committed by Alexandre Julliard
parent 386fdd81e9
commit d3972880c0
1 changed files with 6 additions and 1 deletions

View File

@ -2525,7 +2525,11 @@ int create_msft_typelib(typelib_t *typelib)
if (ctl2_alloc_segment(msft, MSFT_SEG_GUIDHASH, 0x80, 0x80)) { failed = 1; }
if (ctl2_alloc_segment(msft, MSFT_SEG_NAMEHASH, 0x200, 0x200)) { failed = 1; }
if(failed) return 0;
if(failed)
{
free(msft);
return 0;
}
msft->typelib_guidhash_segment = (int *)msft->typelib_segment_data[MSFT_SEG_GUIDHASH];
msft->typelib_namehash_segment = (int *)msft->typelib_segment_data[MSFT_SEG_NAMEHASH];
@ -2557,5 +2561,6 @@ int create_msft_typelib(typelib_t *typelib)
add_entry(msft, entry);
save_all_changes(msft);
free(msft);
return 1;
}