mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 13:06:14 +01:00
GWin32AppInfo: Fix use-after-free
This commit is contained in:
parent
b0b16cf06e
commit
3c2b15fb15
@ -5298,14 +5298,18 @@ make_item_array (gboolean for_files,
|
|||||||
}
|
}
|
||||||
|
|
||||||
hr = SHParseDisplayName (file_or_uri_utf16, NULL, &item_ids[i], 0, NULL);
|
hr = SHParseDisplayName (file_or_uri_utf16, NULL, &item_ids[i], 0, NULL);
|
||||||
g_free (file_or_uri_utf16);
|
|
||||||
|
|
||||||
if (FAILED (hr))
|
if (FAILED (hr))
|
||||||
{
|
{
|
||||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||||
"File or URI `%S' cannot be parsed by SHParseDisplayName: 0x%lx", file_or_uri_utf16, hr);
|
"File or URI `%S' cannot be parsed by SHParseDisplayName: 0x%lx",
|
||||||
|
file_or_uri_utf16, hr);
|
||||||
|
|
||||||
|
g_free (file_or_uri_utf16);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_free (file_or_uri_utf16);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == count)
|
if (i == count)
|
||||||
|
Loading…
Reference in New Issue
Block a user