Commit 722b3ac9 authored by Chong Yidong's avatar Chong Yidong
Browse files

(Fx_get_cut_buffer_internal): Fix memory leak.

parent 18d2ad29
......@@ -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),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment