[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src xselect.c
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] emacs/src xselect.c |
Date: |
Wed, 03 Dec 2008 04:34:06 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 08/12/03 04:34:06
Modified files:
src : xselect.c
Log message:
(Fx_get_cut_buffer_internal): Fix memory leak.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/xselect.c?cvsroot=emacs&r1=1.186&r2=1.187
Patches:
Index: xselect.c
===================================================================
RCS file: /sources/emacs/emacs/src/xselect.c,v
retrieving revision 1.186
retrieving revision 1.187
diff -u -b -r1.186 -r1.187
--- xselect.c 20 Aug 2008 22:09:56 -0000 1.186
+++ xselect.c 3 Dec 2008 04:34:06 -0000 1.187
@@ -2392,8 +2392,15 @@
x_get_window_property (display, window, buffer_atom, &data, &bytes,
&type, &format, &size, 0);
- if (!data || !format)
+
+ if (!data)
+ return Qnil;
+
+ if (!format)
+ {
+ xfree (data);
return Qnil;
+ }
if (format != 8 || type != XA_STRING)
signal_error ("Cut buffer doesn't contain 8-bit data",
- [Emacs-diffs] emacs/src xselect.c,
Chong Yidong <=