mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 23:10:22 +00:00
win32: fix possible memleak if GlobalAlloc() fails
Also remove the unused 'buf' variable. https://bugzilla.gnome.org/show_bug.cgi?id=694742
This commit is contained in:
parent
8eb2278f6a
commit
461c3835aa
@ -155,7 +155,7 @@ gdk_property_change (GdkWindow *window,
|
|||||||
{
|
{
|
||||||
HGLOBAL hdata;
|
HGLOBAL hdata;
|
||||||
gint i, size;
|
gint i, size;
|
||||||
guchar *ucptr, *buf = NULL;
|
guchar *ucptr;
|
||||||
wchar_t *wcptr, *p;
|
wchar_t *wcptr, *p;
|
||||||
glong wclen;
|
glong wclen;
|
||||||
|
|
||||||
@ -214,7 +214,7 @@ gdk_property_change (GdkWindow *window,
|
|||||||
WIN32_API_FAILED ("GlobalAlloc");
|
WIN32_API_FAILED ("GlobalAlloc");
|
||||||
if (!CloseClipboard ())
|
if (!CloseClipboard ())
|
||||||
WIN32_API_FAILED ("CloseClipboard");
|
WIN32_API_FAILED ("CloseClipboard");
|
||||||
g_free (buf);
|
g_free (wcptr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user