On Dec 22, 2007 4:29 AM, Lionel_Debroux <[EMAIL PROTECTED]> wrote: > "msi_load_summary_properties" and "MsiSourceListAddSourceExW" in > dlls/msi/package.c and dlls/msi/source.c get flagged by Michael > Stefaniuc's unfree-wine.pl script. > > 2007-12-21 Lionel Debroux <[EMAIL PROTECTED]> > * dlls/msi/package.c, dlls/msi/source.c: > msi: fix memory leaks on error paths (found by Smatch). >
if (rc != ERROR_SUCCESS) { + msi_free( package_code ); WARN("Unable to query rev number: %d\n", rc); goto done; } Save a line and move the msi_free a couple lines down to the done: block. + { + msi_free(source); /* This is correct because msi strdupW calls msi_alloc. */ return rc; + } Are you serious? Please take that comment out. Either way the fix isn't really right. All you need is a 'goto done' because you're still leaking the reg handles. -- James Hawkins