HCoop
/
bpt
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18d2ad2
)
(Fx_get_cut_buffer_internal): Fix memory leak.
author
Chong Yidong
<cyd@stupidchicken.com>
Wed, 3 Dec 2008 04:34:06 +0000
(
04:34
+0000)
committer
Chong Yidong
<cyd@stupidchicken.com>
Wed, 3 Dec 2008 04:34:06 +0000
(
04:34
+0000)
src/xselect.c
patch
|
blob
|
blame
|
history
diff --git
a/src/xselect.c
b/src/xselect.c
index
7573be8
..
ce106f3
100644
(file)
--- a/
src/xselect.c
+++ b/
src/xselect.c
@@
-2392,9
+2392,16
@@
DEFUN ("x-get-cut-buffer-internal", Fx_get_cut_buffer_internal,
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",
list2 (x_atom_to_symbol (display, type),