[gtk+/gtk-2-24] win32: fix possible memleak if GlobalAlloc() fails
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] win32: fix possible memleak if GlobalAlloc() fails
- Date: Tue, 26 Feb 2013 14:14:54 +0000 (UTC)
commit 461c3835aa83cf4a1a8748cac510d6028cca63b1
Author: Aleksander Morgado <aleksander lanedo com>
Date: Tue Feb 26 14:51:31 2013 +0100
win32: fix possible memleak if GlobalAlloc() fails
Also remove the unused 'buf' variable.
https://bugzilla.gnome.org/show_bug.cgi?id=694742
gdk/win32/gdkproperty-win32.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk/win32/gdkproperty-win32.c b/gdk/win32/gdkproperty-win32.c
index 542f83a..9096729 100644
--- a/gdk/win32/gdkproperty-win32.c
+++ b/gdk/win32/gdkproperty-win32.c
@@ -155,7 +155,7 @@ gdk_property_change (GdkWindow *window,
{
HGLOBAL hdata;
gint i, size;
- guchar *ucptr, *buf = NULL;
+ guchar *ucptr;
wchar_t *wcptr, *p;
glong wclen;
@@ -214,7 +214,7 @@ gdk_property_change (GdkWindow *window,
WIN32_API_FAILED ("GlobalAlloc");
if (!CloseClipboard ())
WIN32_API_FAILED ("CloseClipboard");
- g_free (buf);
+ g_free (wcptr);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]