James Hawkins wrote:
>      module = LoadLibraryExW( file->TargetPath, NULL, 
> LOAD_LIBRARY_AS_DATAFILE );
>      if (module)
>      {
> -        LPCWSTR guid;
> -        guid = MSI_RecordGetString(row,1);
> -        CLSIDFromString((LPWSTR)guid, &tl_struct.clsid);
> +        LPWSTR guid;
> +        guid = strdupW(MSI_RecordGetString(row, 1));
> +        CLSIDFromString(guid, &tl_struct.clsid);
> +        msi_free(guid);
>          tl_struct.source = strdupW( file->TargetPath );
>          tl_struct.path = NULL;
I can guarantee you that CLSIDFromString does not change the input string. We 
should not be adding extra performance costs in the form of extra memory 
allocations for the sake of getting rid of a fairly harmless warning. We should 
fix the ones that don't require an extra allocations or other performance 
penalty and leave the warning off.


-- 
Rob Shearman



Reply via email to