# HG changeset patch # User Chong Yidong # Date 1228279049 0 # Node ID a0a1363582ffab7bc8ebf679bc5e3617aecf66c4 # Parent a2ea34e75036efb11dd0c5c6c46d06e4cfb68222 Fix last fix. diff -r a2ea34e75036 -r a0a1363582ff src/xselect.c --- a/src/xselect.c Wed Dec 03 04:37:24 2008 +0000 +++ b/src/xselect.c Wed Dec 03 04:37:29 2008 +0000 @@ -2369,7 +2369,7 @@ { Window window; Atom buffer_atom; - unsigned char *data; + unsigned char *data = NULL; int bytes; Atom type; int format; @@ -2393,12 +2393,10 @@ x_get_window_property (display, window, buffer_atom, &data, &bytes, &type, &format, &size, 0); - if (!data) - return Qnil; - - if (!format) + if (!data || !format) { - xfree (data); + if (data) + xfree (data); return Qnil; }