MSI: action.c more RegisterProduct work

Mike McCormack mike at codeweavers.com
Wed Jun 8 19:10:09 CDT 2005


Aric Stewart wrote:

> @@ -6033,6 +6042,21 @@
>      size = strlenW(buffer)*sizeof(WCHAR);
>      RegSetValueExW(hukey,szProductName,0,REG_SZ, (LPSTR)buffer,size);
>      HeapFree(GetProcessHeap(),0,buffer);
> +
> +    buffer = load_dynamic_property(package,szProductLanguage,NULL);
> +    size = sizeof(DWORD);
> +    langid = atoiW(buffer);
> +    RegSetValueExW(hukey,szLanguage,0,REG_DWORD, (LPSTR)&langid,size);
> +
> +    buffer = load_dynamic_property(package,szARPProductIcon,NULL);
> +    if (buffer)
> +    {
> +        LPWSTR path;
> +        build_icon_path(package,buffer,&path);
> +        size = strlenW(path) * sizeof(WCHAR);
> +        RegSetValueExW(hukey,szProductIcon,0,REG_SZ, (LPSTR)path,size);
> +    }
> +    
>      FIXME("Need to write more keys to the user registry\n");
>    
>      hDb= alloc_msihandle( &package->db->hdr );

Since load_dynamic_property allocates memory, you leak "buffer" here 
twice...

Mike



More information about the wine-devel mailing list