(Fx_get_cut_buffer_internal): Fix memory leak.
This commit is contained in:
parent
18d2ad2920
commit
722b3ac972
1 changed files with 8 additions and 1 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Reference in a new issue